protected function initialize()
    {
        $class = \get_class($this);

        if (null === self::$loopDefinitions) {
            self::$loopDefinitions = \array_flip($this->container->getParameter('thelia.parser.loops'));
        }

        if (isset(self::$loopDefinitions[$class])) {
            $this->loopName = self::$loopDefinitions[$class];
        }

        if (!isset(self::$loopDefinitionsArgs[$class])) {
            $this->args = $this->getArgDefinitions()->addArguments($this->getDefaultArgs(), false);

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

            self::$loopDefinitionsArgs[$class] = $this->args;
        }

        $this->args = self::$loopDefinitionsArgs[$class];
    }
protected function initialize()
    {
        $class = \get_class($this);

        if (null === self::$loopDefinitions) {
            self::$loopDefinitions = \array_flip($this->container->getParameter('thelia.parser.loops'));
        }

        if (isset(self::$loopDefinitions[$class])) {
            $this->loopName = self::$loopDefinitions[$class];
        }

        if (!isset(self::$loopDefinitionsArgs[$class])) {
            $this->args = $this->getArgDefinitions()->addArguments($this->getDefaultArgs(), false);

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

            self::$loopDefinitionsArgs[$class] = $this->args;
        }

        $this->args = self::$loopDefinitionsArgs[$class];
    }
protected function initialize ( ) { $ class = \ get_class ( $ this ) ; if ( null === self :: $ loopDefinitions ) { self :: $ loopDefinitions = \ array_flip ( $ this -> container -> getParameter ( 'thelia.parser.loops' ) ) ; } if ( isset ( self :: $ loopDefinitions [ $ class ] ) ) { $ this -> loopName = self :: $ loopDefinitions [ $ class ] ; } if ( ! isset ( self :: $ loopDefinitionsArgs [ $ class ] ) ) { $ this -> args = $ this -> getArgDefinitions ( ) -> addArguments ( $ this -> getDefaultArgs ( ) , false ) ; $ eventName = $ this -> getDispatchEventName ( TheliaEvents :: LOOP_EXTENDS_ARG_DEFINITIONS ) ; if ( null !== $ eventName ) { $ this -> dispatcher -> dispatch ( $ eventName , new LoopExtendsArgDefinitionsEvent ( $ this ) ) ; } ; self :: $ loopDefinitionsArgs [ $ class ] = $ this -> args ; } $ this -> args = self :: $ loopDefinitionsArgs [ $ class ] ; }
Initialize the loop

First it will get the loop name according to the loop class.
Then argument definitions is initialized
Initialize the loop