Example #1
0
 /**
  * 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]);
 }
Example #2
0
 /**
  * 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]);
 }
Example #3
0
 /**
  * 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]);
 }
Example #4
0
 /**
  * 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]);
 }