protected function extendsBuildArray(array $search = null)
    {
        if (null === $search) {
            return null;
        }

        $eventName = $this->getDispatchEventName(TheliaEvents::LOOP_EXTENDS_BUILD_ARRAY);
        if (null !== $eventName) {
            $event = new LoopExtendsBuildArrayEvent($this, $search);

            $this->dispatcher->dispatch($eventName, $event);

            $search = $event->getArray();
        }

        return $search;
    }