/**
  * Returns the number of content objects related to tag identified by $tagId.
  *
  * @throws \RuntimeException
  *
  * @param mixed $tagId
  *
  * @return int
  */
 public function getRelatedContentCount($tagId)
 {
     try {
         return $this->innerGateway->getRelatedContentCount($tagId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
Exemple #2
0
 /**
  * Returns the number of content objects related to tag identified by $tagId.
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If the specified tag is not found
  *
  * @param mixed $tagId
  *
  * @return int
  */
 public function getRelatedContentCount($tagId)
 {
     return $this->gateway->getRelatedContentCount($tagId);
 }