Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Exemple de hook_module_implements_alter() dans Drupal 7
<?php
function my_module_module_implements_alter(&$implementations, $hook) {
switch ($hook) {
case 'form_alter':
if (array_key_exists('my_module', $implementations)) {
// On veut que le hook_form_alter my_module soit le dernier exécuté
// On le remet à la fin du tableau
$my_module = $implementations['my_module'];
unset($implementations['my_module']);
$implementations['my_module'] = $my_module;
}
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment