eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler::loadByIdentifier PHP Method

loadByIdentifier() public method

Loads an object state by identifier and group it belongs to.
public loadByIdentifier ( string $identifier, mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState
$identifier string
$groupId mixed
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);
    }