mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Ensure that farm_ui_map's hook_views_pre_render() runs first.
This commit is contained in:
parent
76b46403f3
commit
a27225e383
|
@ -140,3 +140,17 @@ function farm_ui_map_views_pre_render(ViewExecutable $view) {
|
|||
$view->attachment_before['asset_map'] = $map;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_module_implements_alter().
|
||||
*/
|
||||
function farm_ui_map_module_implements_alter(&$implementations, $hook) {
|
||||
|
||||
// Ensure that this module's hook_views_pre_render() runs first.
|
||||
if ($hook == 'views_pre_render') {
|
||||
$module = 'farm_ui_map';
|
||||
$group = $implementations[$module];
|
||||
unset($implementations[$module]);
|
||||
$implementations = array_merge([$module => $group], $implementations);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue