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

Creates ObjectState object from provided $data.
public createObjectStateFromData ( array $data ) : eZ\Publish\SPI\Persistence\Content\ObjectState
$data array
Результат eZ\Publish\SPI\Persistence\Content\ObjectState
Пример #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);
 }