Skip to content
Snippets Groups Projects

Resolve #3526411 "Move hook map"

Closes #3526411

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
22 foreach ($tags as &$tag) {
23 if (
24 !array_key_exists('event', $tag) ||
25 !array_key_exists('module', $tag) ||
26 !str_starts_with($tag['event'], 'drupal_hook.')
27 ) {
28 continue;
29 }
30
31 [1 => $hook] = explode('.', $tag['event'], 2);
32 $class = $container->getDefinition($id)->getClass();
33 $map[$hook][$class][$tag['method']] = $tag['module'];
34 }
35 }
36
37 $container->getDefinition('module_handler')->setArgument(3, $map);
  • nicxvan
  • Please register or sign in to reply
    Loading