eZ\Publish\Core\Repository\ObjectStateService::getContentState PHP Method

getContentState() public method

The $state is the id of the state within one group.
public getContentState ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
return eZ\Publish\API\Repository\Values\ObjectState\ObjectState
    public function getContentState(ContentInfo $contentInfo, APIObjectStateGroup $objectStateGroup)
    {
        $spiObjectState = $this->objectStateHandler->getContentState($contentInfo->id, $objectStateGroup->id);
        return $this->buildDomainObjectStateObject($spiObjectState);
    }