Skip to content
Snippets Groups Projects

Resolve #3506930 "Hookcollectorpass registers event"

Closes #3506930

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
218 * @param array<string, list<string>> $includes
219 * Regular includes.
220 * @param array<string, list<string>> $groupIncludes
221 * Group includes.
222 * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
223 * The container builder.
224 *
225 * @return array<string, \Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument>
226 * Map of service closure arguments, keyed by hook.
227 */
228 protected function buildHookListServiceClosures(array $implementationsByHook, array $includes, array $groupIncludes, ContainerBuilder $container): array {
229 $hookListClosures = [];
230 foreach ($implementationsByHook as $hook => $hookImplementations) {
231 $listeners = [];
232 foreach ($hookImplementations as $identifier => $module) {
233 [$class_or_function, $method_or_null] = explode('::', $identifier, 2) + [1 => NULL];
  • 242 $arguments = [
    243 $listeners,
    244 $modules,
    245 $includes[$hook] ?? [],
    246 $groupIncludes[$hook] ?? [],
    247 ];
    248 // Omit trailing arguments with default value.
    249 if ($arguments[3] === []) {
    250 unset($arguments[3]);
    251 if ($arguments[2] === []) {
    252 unset($arguments[2]);
    253 }
    254 }
    255 $definition = (new Definition(ImplementationList::class))
    256 ->setFactory([ImplementationList::class, 'load'])
    257 ->setPublic(TRUE)
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading