Drupal 8 needs Drush version >= 8. Drush 8 has the dependency of Composer. If you don't have composer download and install it using the link https://getcomposer.org/Composer-Setup.exe for windows. Download and install Git. Open your Command Line or GIT’s bash and try the following commands,
Storage in ionic 2 can be used to store data key/value pairs. We can also store JSON Objects. This Storage can work using may storage engines, here it will choose the best based on the platform. If the application runs in native platfrom it will use SQLite where as if it is in browser it use IndexedDB. Follow the steps to use Storage,
A quick way to prevent robots scanning the website. The below command will stop Search Engines from crawling your website. Add this to your robots.txt file.
A quick way to list globally installed NPM modules. The following command will display all the top-level NPM modules.
Permissions control access in Drupal system. We can able to specify the permissions based on User Roles. We can programmatically able to create custom permissions by implementing the hook_permission in Drupal 7. The below is the syntax and example of how to use custom permissions. Once permissions are defined the need to clear cache. So, that permission available on admin/people/permissions page.
The hook_menu() is the menu router for the Drupal system. In this hook we can able to specify the possible URL paths to our Drupal system. This function implementation must return the associative array of URL paths and their respective callbacks. The below is the syntax and usage example of this hook. Once you have implemented hook needs to flush the cache to detect system.
In Drupal hook_schema() help to create the Tables in Drupal system. This schema is defined in MODULE_NAME.install file. This hook invokes during the Module install. Similarly, during module uninstall tables defined in hook_schema() automatically get deleted. The below is the syntax and example of implementing hook_schema().
In Drupal, commerce Orders are acted as a separate entity. The order has different status during each stage on purchasing. These status updates are taken place during the order checkout process. It possible us to update order status programmatically from one state to others.
While we try to access the apache protected sites it requires username and password to proceed. We can access the access by directly passing the username and password into URL. This will not popup us to provide credentials. The below is the example and syntax usages.
Using the Drupal core currentUser() function we can get logged in user details as Object. Using the object we can determine the user is logged in or not. The below is the sample code of checking whether the user is logged in or not.