Skip to content
Snippets Groups Projects
Commit 5b9e61d7 authored by rudiedirkx's avatar rudiedirkx Committed by Marc van Gend
Browse files

Issue #2442205 by rudiedirkx, ParisLiakos: Fieldblock's entity view alter should be the very last

parent 2b6834f6
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,26 @@ ...@@ -7,6 +7,26 @@
define('FIELDBLOCK_STORAGE_STATIC', 'fieldblock_storage'); define('FIELDBLOCK_STORAGE_STATIC', 'fieldblock_storage');
/**
* Implements hook_module_implements_alter().
*/
function fieldblock_module_implements_alter(&$implementations, $hook) {
// Move these hooks to the end of the execution list. Even though Fieldblock only implements
// hook_entity_view_alter, module_implements() indexes them by first-called, which is the most
// specific, so we need those too.
$view_alter_hooks = array(
'entity_view_alter',
'node_view_alter',
'taxonomy_term_alter',
'user_view_alter',
);
if (in_array($hook, $view_alter_hooks) && isset($implementations['fieldblock'])) {
$group = $implementations['fieldblock'];
unset($implementations['fieldblock']);
$implementations['fieldblock'] = $group;
}
}
/** /**
* Implements hook_form_alter(). * Implements hook_form_alter().
* Adds a column to the "display fields" table-form, with a checkbox for each * Adds a column to the "display fields" table-form, with a checkbox for each
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment