function answers_core_module_implements_alter in Answers 1.0.x
Same name and namespace in other branches
- 2.0.x modules/core/answers_core.module \answers_core_module_implements_alter()
File
- modules/
core/ answers_core.module, line 133
Code
function answers_core_module_implements_alter(&$implementations, $hook) {
if ($hook == 'node_links_alter') {
// Move my_module_form_alter() to the end of the list.
// \Drupal::moduleHandler()->getImplementations()
// iterates through $implementations with a foreach loop which PHP iterates
// in the order that the items were added, so to move an item to the end of
// the array, we remove it and then add it.
$group = $implementations['answers_core'];
unset($implementations['answers_core']);
$implementations['answers_core'] = $group;
}
}