lib/Persistence/Doctrine/QueryHandler/CollectionQueryHandler.php
public function collectionExists($collectionId, int $status): bool
    {
        $query = $this->connection->createQueryBuilder();
        $query->select('count(*) AS count')
            ->from('ngbm_collection')
            ->where(
                $query->expr()->eq('id', ':id')
            )
            ->setParameter('id', $collectionId, Type::INTEGER);

        $this->applyStatusCondition($query, $status);

        $data = $query->execute()->fetchAll(PDO::FETCH_ASSOC);

        return (int) ($data[0]['count'] ?? 0) > 0;
    }
public function collectionExists($collectionId, int $status): bool
    {
        $query = $this->connection->createQueryBuilder();
        $query->select('count(*) AS count')
            ->from('ngbm_collection')
            ->where(
                $query->expr()->eq('id', ':id')
            )
            ->setParameter('id', $collectionId, Type::INTEGER);

        $this->applyStatusCondition($query, $status);

        $data = $query->execute()->fetchAll(PDO::FETCH_ASSOC);

        return (int) ($data[0]['count'] ?? 0) > 0;
    }
public function collectionExists ( $ collectionId , int $ status ) : bool { $ query = $ this -> connection -> createQueryBuilder ( ) ; $ query -> select ( 'count(*) AS count' ) -> from ( 'ngbm_collection' ) -> where ( $ query -> expr ( ) -> eq ( 'id' , ':id' ) ) -> setParameter ( 'id' , $ collectionId , Type :: INTEGER ) ; $ this -> applyStatusCondition ( $ query , $ status ) ; $ data = $ query -> execute ( ) -> fetchAll ( PDO :: FETCH_ASSOC ) ; return ( int ) ( $ data [ 0 ] [ 'count' ] ?? 0 ) > 0 ; }
Returns if the collection exists.

@param int|string $collectionId
@param int $status

@return bool
Returns if the collection exists .