eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway\DoctrineDatabase::getContentCount PHP Метод

getContentCount() публичный Метод

Returns the number of objects which are in this state.
public getContentCount ( mixed $stateId ) : integer
$stateId mixed
Результат integer
    public function getContentCount($stateId)
    {
        $query = $this->dbHandler->createSelectQuery();
        $query->select($query->alias($query->expr->count('*'), 'count'))->from($this->dbHandler->quoteTable('ezcobj_state_link'))->where($query->expr->eq($this->dbHandler->quoteColumn('contentobject_state_id'), $query->bindValue($stateId, null, \PDO::PARAM_INT)));
        $statement = $query->prepare();
        $statement->execute();
        $count = $statement->fetchColumn();
        return $count !== null ? (int) $count : 0;
    }