Last Updated: February 25, 2016
·
609
· adziendziel

Order of executions specific hook by different modules

/**
* Implements hook_module_implements_alter()
*/
function mymodule_module_implements_alter(&$implementations, $hook) {
  //Any change here requires Caches to be cleared.
//Order of executions hook_form_alter before called hook_module_implements_alter
//dpm($implementations);
  switch ($hook) {
    case 'form_alter':
      $m1 = $implementations['mymodule'];
      unset($implementations['mymodule']);

      $implementations['mymodule'] = $m1;
      break;
  }
//Order of executions after called this hook
//dpm($implementations);
}

From my snippet on Dropbucket.org: http://dropbucket.org/node/199