protected function extendsBuildModelCriteria(ModelCriteria $search = null)
    {
        if (null === $search) {
            return null;
        }

        $eventName = $this->getDispatchEventName(TheliaEvents::LOOP_EXTENDS_BUILD_MODEL_CRITERIA);
        if (null !== $eventName) {
            $this->dispatcher->dispatch(
                $eventName,
                new LoopExtendsBuildModelCriteriaEvent($this, $search)
            );
        }

        return $search;
    }
protected function extendsBuildModelCriteria(ModelCriteria $search = null)
    {
        if (null === $search) {
            return null;
        }

        $eventName = $this->getDispatchEventName(TheliaEvents::LOOP_EXTENDS_BUILD_MODEL_CRITERIA);
        if (null !== $eventName) {
            $this->dispatcher->dispatch(
                $eventName,
                new LoopExtendsBuildModelCriteriaEvent($this, $search)
            );
        }

        return $search;
    }
protected function extendsBuildModelCriteria ( ModelCriteria $ search = null ) { if ( null === $ search ) { return null ; } $ eventName = $ this -> getDispatchEventName ( TheliaEvents :: LOOP_EXTENDS_BUILD_MODEL_CRITERIA ) ; if ( null !== $ eventName ) { $ this -> dispatcher -> dispatch ( $ eventName , new LoopExtendsBuildModelCriteriaEvent ( $ this , $ search ) ) ; } return $ search ; }
Dispatch an event to extend the BuildModelCriteria

@param ModelCriteria $search
@return ModelCriteria
Dispatch an event to extend the BuildModelCriteria