public count ( $depth, $filter = [], Sulu\Bundle\MediaBundle\Entity\CollectionInterface $collection = null ) | ||
$collection | Sulu\Bundle\MediaBundle\Entity\CollectionInterface |
public function count($depth = 0, $filter = [], CollectionInterface $collection = null)
{
$ids = $this->getIdsQuery($depth, $filter, [], $collection, 'DISTINCT collection.id')->getScalarResult();
try {
return count($ids);
} catch (NoResultException $e) {
return;
}
}