php is oops is great
Public html folder ke andar
view and api folder hota hai
Class view
Payload . Request ko dikhata hai
Cn class name
Inspect tool
Api ajax call
Practical use
Netwrok tab any call registered
Payment name cash
Call createpayment type call
Click on payload
First thing hit is API
Class call
Debug how logic works
Open inspect window
Open network tab
See for api
Read api file in html public folder
CN nomenclature for class module
Purchase order is class inwhich
Createpayment type method defined
Public html ke bahar hai class name
Two class hota hai first
Purchase order class dusra SQL class
Class me businees logic jab SQL se data agaya
SQL query dekna ho
What is $this in PHP?
In PHP, $this keyword references the current object of the class.
The $this keyword allows you to access the properties and methods of the current object
within the class using the object operator (->):
The $this keyword is only available within a class method .
It doesn’t exist outside of the class.
If you attempt to use the $this outside of a class, you’ll get an error.
When you access an object property using the $this keyword,
you use the $ with the this keyword only. And you don’t use the $ with the property name
CSS list
list-style-type: circle/square/upper-roman/lower-alpha/lower-alpha;
list-style-position: outside/inside;;
List - Shorthand property: list-style: square inside url("sqpurple.gif");
There are four different combinators in CSS:
descendant selector (space)
child selector (>)
adjacent sibling selector (+)
general sibling selector (~)
inline style=" height:75px;width:200px ;"
text-transform: uppercase/lowercase;/capitalize;
text-align: center/left/right/justify;
vertical-align: baseline;
vertical-align: text-top/text-bottom/sub/super;
CSS Table
border-collapse: collapse; collapse boder in single line
text-align: center;
The vertical-align property sets the vertical alignment (like top, bottom, or middle) of the content in
| Value | Value | Description |
|---|---|---|
| none | Default value. No shadow is displayed | |
| h-offset | Required. The horizontal offset of the shadow. A positive value puts the
shadow on the right side of the box, a negative value puts the shadow on the left side of the box |
|
| v-offset | Required. The vertical offset of the shadow. A positive value puts the
shadow below the box, a negative value puts the shadow above the box |
|
| blur | Optional. The blur radius. The higher the number, the more blurred the
shadow will be |
|
| spread | Optional. The spread radius. A positive value increases the size of the
shadow, a negative value decreases the size of the shadow |
|
| color | Optional. The color of the shadow. The default value is the text color. Look at CSS Color Values for a complete list of possible color values. Note: In Safari (on PC) the color parameter is required. If you do not specify the color, the shadow is not displayed at all. |
|
| inset | Optional. Changes the shadow from an outer shadow (outset) to an inner shadow | |
| initial | Sets this property to its default value. Read about initial | |
| inherit | Inherits this property from its parent element. Read about inherit |
User name Host name Password Global privileges User group Grant Action
Any % No USAGE No Edit privileges Edit privileges Export Export
kamlu % Yes ALL PRIVILEGES Yes Edit privileges Edit privileges Export Export
pma localhost No USAGE No Edit privileges Edit privileges Export Export
root 127.0.0.1 No ALL PRIVILEGES Yes Edit privileges Edit privileges Export Export
root ::1 No ALL PRIVILEGES Yes Edit privileges Edit privileges Export Export
root localhost No ALL PRIVILEGES Yes Edit privileges Edit privileges Export Export
Data base name in php my admin local host : kamlu
username :kamlu
password: kamlu@123
how to open php my admin in local host : localhost/phpmyadmin/index.php
kamsite Maintenance credential
email: giga.kumar@gmail.com
username: kamlu
password: kamlu@123
Single and Double Quotes in JavaScript Strings
Strings in JavaScript are contained within a pair of either single quotation marks '' or double quotation marks "". Both quotes represent Strings but be sure to choose one and STICK WITH IT. If you start with a single quote, you need to end with a single quote.
drupel menu add
home>Adminstration>structure>menu> add menu >main menu >add tile and description>save>path link>save
<\P>
drupal acuaia
content type
most of cms have mostly title and body but in drupal every content is a node
and each node belong to single content type , conatent type defines dafult setting for nodes.
it contols how content is addded in your site beacuse every content types have fields
text format : basic (list paragragh etc )restricted(paragragh line break ) fullhtml(all html tag and script )
joyti drupal traing part 1 notes
->project shuld done by composer
->composer is devleped by php community
->for insttaltion of pacakage composer require lock file and json file
->lock file use to record version for package
->composer abovd 2.0 does not need any plugin
-> if we do not need interaction then comand --no interaction --no install
->ceratin project rerquire depandencies
-> benifits of composer is it better know all files which are required for install of partical package
and their dependencies
->jason file conatins require section which conatin all depencies
->if cerain pakage is not required by in production then package is written as --no-dev
it means then name of package where dash dev (-dev) will be not shared for production it will only act
custom package for devloper.
-> to create project command is composer create-project drupal/recomnded-project kamproject i.e name of project
->carat sign^ in version function as the update for veriosn if not used then when update for version is done then
it will stick with existing version and version will not update
->all package all availble on https://packagist.org/
->if we habve not lock filer the composer will installl latest version this will creagte ambugity
among devloper because all devloper require same veriosn of package while working same project
this is benifits of lock file
->devloper of drupel wanted to name as drop but spellling mistake it was name drupel and drop icon
->gitignore: not sent file to git i.e our core package beacuse it is user defined and customer details
->never change any data in core
->jason file conatin version of each package , thus when update are vailble then verison are updated accodring to jason file
->libray samaj nahi aya
joyti drupal traing part notes
-> How to add js library
-> suppose we want to add slick library
first under repository we add slick which contains type and package
(package contain name version type AND source )
"slick " :{
"type":PACKAGE
"PACAKGE ":{
"NAME":
"TYPE":
"VERSION":
"source":{
"URL": GIT@GITHUB.COM
"TYPE":"GI"
"REFENCE":"2.0"
}
}
}
GIT HUB LOGIN
USERNAME: giga.kumar@gmail.com
password: giga@1234
git stages
when create files then it is untrack stage
then add files for tracking
then commit files
them modify files
git command practice
git init : start git make respository
git touch : generate empty file
git status : shows files (green means it is tracked) red menans not tracked
git add -A : means it make all files trackale and now we can perform operations
git commit -m "message" : make commit all files or upload
git checkout filename : makes files recovered on delete if file is deleted
joyti drupal traing part 1 notes
->project shuld done by composer
->composer is devleped by php community
->for insttaltion of pacakage composer require lock file and json file
->lock file use to record version for package
->composer abovd 2.0 does not need any plugin
-> if we do not need interaction then comand --no interaction --no install
->ceratin project rerquire depandencies
-> benifits of composer is it better know all files which are required for install of partical package
and their dependencies
->jason file conatins require section which conatin all depencies
->if cerain pakage is not required by in production then package is written as --no-dev
it means then name of package where dash dev (-dev) will be not shared for production it will only act
custom package for devloper.
-> to create project command is composer create-project drupal/recomnded-project kamproject i.e name of project
->carat sign^ in version function as the update for veriosn if not used then when update for version is done then
it will stick with existing version and version will not update
->all package all availble on https://packagist.org/
->if we habve not lock filer the composer will installl latest version this will creagte ambugity
among devloper because all devloper require same veriosn of package while working same project
this is benifits of lock file
->devloper of drupel wanted to name as drop but spellling mistake it was name drupel and drop icon
->gitignore: not sent file to git i.e our core package beacuse it is user defined and customer details
->never change any data in core
->jason file conatin version of each package , thus when update are vailble then verison are updated accodring to jason file
->libray samaj nahi aya
joyti drupal traing part notes
-> How to add js library
-> suppose we want to add slick library
first under repository we add slick which contains type and package
(package contain name version type AND source )
"slick " :{
"type":PACKAGE
"PACAKGE ":{
"NAME":
"TYPE":
"VERSION":
"source":{
"URL": GIT@GITHUB.COM
"TYPE":"GI"
"REFENCE":"2.0"
}
}
}
joyti drupal traing part notes
-> How to add js library
-> suppose we want to add slick library
first under repository we add slick which contains type and package
(package contain name version type AND source )
"slick " :{
"type":PACKAGE
"PACAKGE ":{
"NAME":"FULLSTACKTRAIN/SLICK",
"TYPE":"DRUOPAL-LIBRARY",
"VERSION":"1.1.0", IT IS ARBITARY
"source":{
"URL": "GIT@GITHUB.COM"
"TYPE":"GI"
"REFENCE":"2.0"
}
}
}
->COMMAD TO ADD A LIBRARY
COMPOSER REQUIRE FULLSTACK/SLICK
IT WILL ADD LIBRARY TO OUR REQUIRE MODULE
GIT HUB LOGIN
USERNAME: giga.kumar@gmail.com
password: giga@1234
git stages
when create files then it is untrack stage
then add files for tracking
then commit files
them modify files
git command practice
git init : start git make respository
git touch : generate empty file
git status : shows files (green means it is tracked) red menans not tracked
git add -A : means it make all files trackale and now we can perform operations
git commit -m "message" : make commit all files or upload
git checkout filename : makes files recovered on delete if file is deleted
<\P>
>
->Entiies type are useful abstraction to group fields
eg. noded ,user,media beacuse it encapsulate fields togethwer and contain entites
->any thing under structure is entity type and entities
->entity type>bundles>fileds> one entry is called entity
->enity type conatins bundles and buldle conatins fields or attribute . one entry of enity type is called enity
<\P
->display mode 1. default 2. rss 3. teaser
->adding new view mode: structure >Display modes >View modes >Choose view mode entity type
>give name of new view mode say card >say for enity type content we have added extra view mode
i.e card . we can navigate view mode i.e strucutre >display mode>view mode> list of view modes availbe
it contains our added view mode. In javascript, the behaviour of “this” keyword is based on how a function is called. “this” holds the reference to current execution context in javascript. Depending on how a function is called, this can refer to different objects.
In javascript, the behaviour of “this” keyword is based on how a function is called. “this” holds the reference to current execution context in javascript. Depending on how a function is called, this can refer to different objects.
this in java script
-> in which contect this comes
if this is defined in method then this has refence of owner object(comes under method owner oject context )
if this is defined in standlone then it has reference to window object (comes under winwod owner context )
in strice mode it is undefined . need to explict give this context i.e with whom object to bind
layout Builder
-> thumb rule for layout builder : use it for dynamic content not for static content
->Every thing in layout is a block
-> we need to enable layout builder by navigating manage > extend > enter . it will show no. of modeule avalibale
first we need to type layout in search bar and then enable check box ans then click install
when lay out get install then we navigate Home >Administration >Structure >Content types >Basic page>manage dispaly
> on page bottom >layout option >check box use lay out builder > all fields of basic page are removed and there appear
Manage Layout Buttion > click on manage layout button >add swection > two column >column width 50% 50% >then section is added with two blocks kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Team password kamalkumar@123 New mail id
Kamlendra.kr2020@gmail.com New mail id
Kamlendra.kr2020@gmail.com
JQUERY
->$(SELECTOR).ACTION();
->HIDE(),SHOW(),HTML(),RETUN TRUE means futher excecution of program/ false means stop excution of program
->length .submit()
$(document).ready(function(){
$("button").click(function(){alert("hellio o oo o ");});
});
<\P>
{% if field_hide_learn_more_button == "Off" %}//unneck
{% set view_link = view_node %} url value
{% if field_learn_more_url is not empty %}
{% set target = 'target="_blank" ' %}
{% set view_link = field_learn_more_url %}
Learn More
{% endif %}
{% endif %}
{% if field_event_details_register_url %}
Register
{% endif %}
<\P>
% if field_hide_learn_more_button == "Off" %}
{% if field_learn_more_url is not empty %}
{% set view_link = field_learn_more_url %}
Learn More
{% endif %}
{% endif %} Functions and templates for the user interface that themes can override.
<\P>
https://api.hostdog.eu/api/drupal-9
https://www.drupal.org/docs/develop/standards/php/object-oriented-code