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;
    }
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;
    }
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 ; }
Dispatch an event to extend the BuildArray

@param array $search
@return array
Dispatch an event to extend the BuildArray