/** * @param string $matcherIdentifier * * @return \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MatcherInterface */ protected function getMatcher($matcherIdentifier) { if ($this->container->has($matcherIdentifier)) { return $this->container->get($matcherIdentifier); } return parent::getMatcher($matcherIdentifier); }
/** * Returns the matcher object. * * @param string $matcherIdentifier The matcher class. * If it begins with a '\' it means it's a fully qualified class name, * otherwise it is relative to provided namespace (if available). * * @throws \InvalidArgumentException If no matcher could be found * * @return \eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface */ protected function getMatcher($matcherIdentifier) { if ($this->container->has($matcherIdentifier)) { return $this->container->get($matcherIdentifier); } $matcher = parent::getMatcher($matcherIdentifier); if (!$matcher instanceof ViewMatcherInterface) { throw new InvalidArgumentException('Matcher for tags must implement eZ\\Publish\\Core\\MVC\\Symfony\\Matcher\\ViewMatcherInterface.'); } if ($matcher instanceof TagsServiceAwareInterface) { $matcher->setTagsService($this->tagsService); } if ($matcher instanceof MultipleValued) { $matcher->setTranslationHelper($this->translationHelper); } return $matcher; }