예제 #1
0
 /**
  * Returns the number of tags by specified keyword.
  *
  * @param string $keyword The keyword to fetch tags count for
  * @param string $language The language to check for
  * @param bool $useAlwaysAvailable Check for main language if true (default) and if tag is always available
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException If the current user is not allowed to read tags
  *
  * @return int
  */
 public function getTagsByKeywordCount($keyword, $language, $useAlwaysAvailable = true)
 {
     if ($this->hasAccess('tags', 'read') !== true) {
         throw new UnauthorizedException('tags', 'read');
     }
     return $this->tagsHandler->getTagsByKeywordCount($keyword, $language, $useAlwaysAvailable);
 }