loadObjectStateDataByIdentifier() abstract public method

Loads data for an object state by identifier.
abstract public loadObjectStateDataByIdentifier ( string $identifier, mixed $groupId ) : array
$identifier string
$groupId mixed
return array
コード例 #1
0
 /**
  * Loads data for an object state by identifier.
  *
  * @param string $identifier
  * @param mixed $groupId
  *
  * @return array
  */
 public function loadObjectStateDataByIdentifier($identifier, $groupId)
 {
     try {
         return $this->innerGateway->loadObjectStateDataByIdentifier($identifier, $groupId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
コード例 #2
0
 /**
  * Loads an object state by identifier and group it belongs to
  *
  * @param string $identifier
  * @param mixed $groupId
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if the state was not found
  *
  * @return \eZ\Publish\SPI\Persistence\Content\ObjectState
  */
 public function loadByIdentifier($identifier, $groupId)
 {
     $data = $this->objectStateGateway->loadObjectStateDataByIdentifier($identifier, $groupId);
     if (empty($data)) {
         throw new NotFoundException("ObjectState", array('identifier' => $identifier, 'groupId' => $groupId));
     }
     return $this->objectStateMapper->createObjectStateFromData($data);
 }