/** * Matches the $view against a set of matchers. * * @param \eZ\Publish\Core\MVC\Symfony\View\View $view * * @return bool */ public function match(View $view) { if (!$view instanceof TagValueView) { return false; } return isset($this->values[$view->getTag()->mainTagId]); }
/** * Matches the $view against a set of matchers. * * @param \eZ\Publish\Core\MVC\Symfony\View\View $view * * @return bool */ public function match(View $view) { if (!$view instanceof TagValueView) { return false; } $keyword = $this->translationHelper->getTranslatedByMethod($view->getTag(), 'getKeyword'); return isset($this->values[$keyword]); }
/** * Matches the $view against a set of matchers. * * @param \eZ\Publish\Core\MVC\Symfony\View\View $view * * @return bool */ public function match(View $view) { if (!$view instanceof TagValueView) { return false; } $tag = $view->getTag(); $parentTag = $this->tagsService->sudo(function (TagsService $tagsService) use($tag) { return $tagsService->loadTag($tag->parentTagId); }); return isset($this->values[$parentTag->remoteId]); }
/** * Matches the $view against a set of matchers. * * @param \eZ\Publish\Core\MVC\Symfony\View\View $view * * @return bool */ public function match(View $view) { if (!$view instanceof TagValueView) { return false; } $tag = $view->getTag(); $parentTag = $this->tagsService->sudo(function (TagsService $tagsService) use($tag) { return $tagsService->loadTag($tag->parentTagId); }); $keyword = $this->translationHelper->getTranslatedByMethod($parentTag, 'getKeyword'); return isset($this->values[$keyword]); }