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

getContentState() public method

The $state is the id of the state within one group.
public getContentState ( mixed $contentId, mixed $stateGroupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState
$contentId mixed
$stateGroupId mixed
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);
    }