loadObjectStateDataForContent() абстрактный публичный Метод

Loads object state data for $contentId content from $stateGroupId state group.
abstract public loadObjectStateDataForContent ( integer $contentId, integer $stateGroupId ) : array
$contentId integer
$stateGroupId integer
Результат array
Пример #1
0
 /**
  * Gets the object-state of object identified by $contentId.
  *
  * The $state is the id of the state within one group.
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If no state is found
  *
  * @param mixed $contentId
  * @param mixed $stateGroupId
  *
  * @return \eZ\Publish\SPI\Persistence\Content\ObjectState
  */
 public function getContentState($contentId, $stateGroupId)
 {
     $data = $this->objectStateGateway->loadObjectStateDataForContent($contentId, $stateGroupId);
     if (empty($data)) {
         throw new NotFoundException("ObjectState", array("groupId" => $stateGroupId));
     }
     return $this->objectStateMapper->createObjectStateFromData($data);
 }
 /**
  * Loads object state data for $contentId content from $stateGroupId state group.
  *
  * @param int $contentId
  * @param int $stateGroupId
  *
  * @return array
  */
 public function loadObjectStateDataForContent($contentId, $stateGroupId)
 {
     try {
         return $this->innerGateway->loadObjectStateDataForContent($contentId, $stateGroupId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }