eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway::getContentCount PHP Method

getContentCount() abstract public method

Returns the number of objects which are in this state.
abstract public getContentCount ( mixed $stateId ) : integer
$stateId mixed
return integer
    public abstract function getContentCount($stateId);

Usage Example

 /**
  * Returns the number of objects which are in this state.
  *
  * @param mixed $stateId
  *
  * @return int
  */
 public function getContentCount($stateId)
 {
     try {
         return $this->innerGateway->getContentCount($stateId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway::getContentCount