Wednesday, January 27, 2016

Drupal 7: How to create update hook

Step 1: Go to the following path and create update hook to perform the action.


 * Disabled PSL Newsletter module
 * Implements hook_update_N()
function mymodule_update_7300(&$sandbox) {
   return 'Newsletter has been disabled';

Step 2: Go to project root path and run drush updb -y

No comments:

Post a Comment