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

buildDomainObjectStateObject() protected method

Converts the object state SPI value object to API value object.
protected buildDomainObjectStateObject ( eZ\Publish\SPI\Persistence\Content\ObjectState $spiObjectState, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup = null ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$spiObjectState eZ\Publish\SPI\Persistence\Content\ObjectState
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
return eZ\Publish\API\Repository\Values\ObjectState\ObjectState
    protected function buildDomainObjectStateObject(SPIObjectState $spiObjectState, APIObjectStateGroup $objectStateGroup = null)
    {
        $objectStateGroup = $objectStateGroup ?: $this->loadObjectStateGroup($spiObjectState->groupId);
        return new ObjectState(array('id' => $spiObjectState->id, 'identifier' => $spiObjectState->identifier, 'priority' => $spiObjectState->priority, 'defaultLanguageCode' => $spiObjectState->defaultLanguage, 'languageCodes' => $spiObjectState->languageCodes, 'names' => $spiObjectState->name, 'descriptions' => $spiObjectState->description, 'objectStateGroup' => $objectStateGroup));
    }