Create event for contact_photo_menu hook

This commit is contained in:
Art4 2025-03-14 13:23:21 +00:00
parent 9cf0ce0b99
commit d34861ee96
5 changed files with 17 additions and 2 deletions

View file

@ -1312,9 +1312,17 @@ class Contact
}
}
$args = ['contact' => $contact, 'menu' => &$menu];
$args = ['contact' => $contact, 'menu' => $menu];
Hook::callAll('contact_photo_menu', $args);
$eventDispatcher = DI::eventDispatcher();
$args = $eventDispatcher->dispatch(
new ArrayFilterEvent(ArrayFilterEvent::CONTACT_PHOTO_MENU, $args),
)->getArray();
if (is_array($args['menu'])) {
$menu = $args['menu'];
}
$menucondensed = [];