Use partials views templates for ajax calls in controller action as response in phalcon

This will be helpful for someone who is willing to create ajax calls by controller action and use partial template instead of default action view template.

Example Say you would have  controller action that will have one view template. now here by using the same  view template   you are going to use it for some other controller action as a partial.

Point is you are going to use one controller action view template for multiple controller actions as  partials.


Debugging Drupal8 Manually how to debug manual

Debugging Drupal8 Core Manually

ill tell you How to debug Drupal 8 Core, No steps, No format, Just follow,

First you need to know php oops namespace use, psr 4 - autoloader, yaml, Dependency Injection , Service Containers.

Open some file in drupal 8 now.

Did you find anything,

Let me tell you the file navigate to drupal 8 installed root path in file view.

Now think of the function you use in drupal 8 to generate Url.



Oops namespace in drupal 8

Before Going to Drupal 8. letme tell you about namespace

What is namespace ?

My description in oops. its just to solve the conflict between defining same class in an application.

Say for example in your college or workplace  you would have 2 or more  person with the same name. You would end up in confusion or curious to know  which person is that when somebodies talking or gossiping about that name. so to overcome this you people would come up with  some pet name or nick name to them.

Same namespace its just a nickname for a class

Steps to Install xhprof in ubuntu and integrate xhprof with yii 2 framework

First we have to install xhprof in ubuntu ( integration )

Install graphviz 

sudo apt-get install graphviz
sudo apt-get install libgv-php5

This step is to generate callgraph of xhprof


Install Xhprof by pecl

sudo pecl install xhprof-0.9.4

 Add and enable php module XHProf to PHP5:

sudo -s
echo "" > /etc/php5/mods-available/xhprof.ini
php5enmod xhprof

Test it

Handy frequently used useful bash shell script aliases

alias html='cd /var/www/html/'

alias gs='git status'

alias gp='git pull'

alias ga='_ga () { git add "$@"; }; _ga'

alias clr='clear'

alias ..='cd ..'

alias 7='_7 () { sudo chmod 777 -R "$@"; }; _7'

alias 75='_75 () { sudo chmod 755 -R "$@"; }; _75'

alias gc='_gc() { git commit -m "$1" "$2"; }; _gc'

alias gps='git push'

alias slr='_slr () { 
if [ -z "$@" ]; then
/opt/solr-5.5.2/bin/solr start;
/opt/solr-5.5.2/bin/solr "$@";
fi  }; _slr'

alias oh='gnome-open /var/www/html/'

alias gd='_gd () { 
if [ -z "$@" ]; then
git diff;
git diff "$@";
fi  }; _gd'