protected function getDispatchEventName($eventName)
    {
        $customEventName = TheliaEvents::getLoopExtendsEvent($eventName, $this->loopName);

        if (!isset(self::$dispatchCache[$customEventName])) {
            self::$dispatchCache[$customEventName] = $this->dispatcher->hasListeners($customEventName);
        }

        return self::$dispatchCache[$customEventName]
            ? $customEventName
            : null;
    }
protected function getDispatchEventName($eventName)
    {
        $customEventName = TheliaEvents::getLoopExtendsEvent($eventName, $this->loopName);

        if (!isset(self::$dispatchCache[$customEventName])) {
            self::$dispatchCache[$customEventName] = $this->dispatcher->hasListeners($customEventName);
        }

        return self::$dispatchCache[$customEventName]
            ? $customEventName
            : null;
    }
protected function getDispatchEventName ( $ eventName ) { $ customEventName = TheliaEvents :: getLoopExtendsEvent ( $ eventName , $ this -> loopName ) ; if ( ! isset ( self :: $ dispatchCache [ $ customEventName ] ) ) { self :: $ dispatchCache [ $ customEventName ] = $ this -> dispatcher -> hasListeners ( $ customEventName ) ; } return self :: $ dispatchCache [ $ customEventName ] ? $ customEventName : null ; }
Get the event name for the loop depending of the event name and the loop name.

This function also checks if there are services that listen to this event.
If not the function returns null.

@param string $eventName the event name (`TheliaEvents::LOOP_EXTENDS_ARG_DEFINITIONS`,
`TheliaEvents::LOOP_EXTENDS_INITIALIZE_ARGS`, ...)
@return null|string The event name for the loop if listeners exist, otherwise null is returned
Get the event name for the loop depending of the event name and the loop name .