Пример #1
0
 /**
  * Returns how many tags exist below tag identified by $tagId.
  *
  * @throws \RuntimeException
  *
  * @param mixed $tagId
  * @param string[] $translations
  * @param bool $useAlwaysAvailable
  *
  * @return int
  */
 public function getChildrenCount($tagId, array $translations = null, $useAlwaysAvailable = true)
 {
     try {
         return $this->innerGateway->getChildrenCount($tagId, $translations, $useAlwaysAvailable);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
Пример #2
0
 /**
  * Returns the number of children of a tag identified by $tagId.
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If the specified tag is not found
  *
  * @param mixed $tagId
  * @param string[] $translations
  * @param bool $useAlwaysAvailable
  *
  * @return int
  */
 public function getChildrenCount($tagId, array $translations = null, $useAlwaysAvailable = true)
 {
     return $this->gateway->getChildrenCount($tagId, $translations, $useAlwaysAvailable);
 }