public countContentObjectsInSection ( integer $id ) : integer | ||
$id | integer | |
return | integer |
public function countContentObjectsInSection($id)
{
$query = $this->dbHandler->createSelectQuery();
$query->select($query->alias($query->expr->count($this->dbHandler->quoteColumn('id')), 'content_count'))->from($this->dbHandler->quoteTable('ezcontentobject'))->where($query->expr->eq($this->dbHandler->quoteColumn('section_id'), $query->bindValue($id, null, \PDO::PARAM_INT)));
$statement = $query->prepare();
$statement->execute();
return (int) $statement->fetchColumn();
}