/** * Call all interceptors registered for a given interception point. * * @param NodeInterface $node The syntax tree node which can be modified by the interceptors. * @param integer $interceptionPoint the interception point. One of the \TYPO3\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_* constants. * @param ParsingState $state the parsing state * @return void */ protected function callInterceptor(NodeInterface &$node, $interceptionPoint, ParsingState $state) { if ($this->configuration === NULL) { return; } if ($this->escapingEnabled) { /** @var $interceptor InterceptorInterface */ foreach ($this->configuration->getEscapingInterceptors($interceptionPoint) as $interceptor) { $node = $interceptor->process($node, $interceptionPoint, $state); } } /** @var $interceptor InterceptorInterface */ foreach ($this->configuration->getInterceptors($interceptionPoint) as $interceptor) { $node = $interceptor->process($node, $interceptionPoint, $state); } }
/** * Call all interceptors registered for a given interception point. * * @param NodeInterface $node The syntax tree node which can be modified by the interceptors. * @param integer $interceptionPoint the interception point. One of the \TYPO3\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_* constants. * @param ParsingState $state the parsing state * @return void */ protected function callInterceptor(NodeInterface &$node, $interceptionPoint, ParsingState $state) { if ($this->configuration !== NULL) { // $this->configuration is UNSET inside the arguments of a ViewHelper. // That's why the interceptors are only called if the object accesor is not inside a ViewHelper Argument // This could be a problem if We have a ViewHelper as an argument to another ViewHelper, and an ObjectAccessor nested inside there. // TODO: Clean up this. $interceptors = $this->configuration->getInterceptors($interceptionPoint); if (count($interceptors) > 0) { /** @var $interceptor InterceptorInterface */ foreach ($interceptors as $interceptor) { $node = $interceptor->process($node, $interceptionPoint, $state); } } } }