protected function buildDomainObjectStateObject(
        SPIObjectState $spiObjectState,
        APIObjectStateGroup $objectStateGroup = null,
        array $prioritizedLanguages = []
    ) {
        $objectStateGroup = $objectStateGroup ?: $this->loadObjectStateGroup($spiObjectState->groupId);

        return new ObjectState(
            [
                'id' => $spiObjectState->id,
                'identifier' => $spiObjectState->identifier,
                'priority' => $spiObjectState->priority,
                'mainLanguageCode' => $spiObjectState->defaultLanguage,
                'languageCodes' => $spiObjectState->languageCodes,
                'names' => $spiObjectState->name,
                'descriptions' => $spiObjectState->description,
                'objectStateGroup' => $objectStateGroup,
                'prioritizedLanguages' => $prioritizedLanguages,
            ]
        );
    }
protected function buildDomainObjectStateObject(
        SPIObjectState $spiObjectState,
        APIObjectStateGroup $objectStateGroup = null,
        array $prioritizedLanguages = []
    ) {
        $objectStateGroup = $objectStateGroup ?: $this->loadObjectStateGroup($spiObjectState->groupId);

        return new ObjectState(
            [
                'id' => $spiObjectState->id,
                'identifier' => $spiObjectState->identifier,
                'priority' => $spiObjectState->priority,
                'mainLanguageCode' => $spiObjectState->defaultLanguage,
                'languageCodes' => $spiObjectState->languageCodes,
                'names' => $spiObjectState->name,
                'descriptions' => $spiObjectState->description,
                'objectStateGroup' => $objectStateGroup,
                'prioritizedLanguages' => $prioritizedLanguages,
            ]
        );
    }
protected function buildDomainObjectStateObject ( SPIObjectState $ spiObjectState , APIObjectStateGroup $ objectStateGroup = null , array $ prioritizedLanguages = [ ] ) { $ objectStateGroup = $ objectStateGroup ? : $ this -> loadObjectStateGroup ( $ spiObjectState -> groupId ) ; return new ObjectState ( [ 'id' => $ spiObjectState -> id , 'identifier' => $ spiObjectState -> identifier , 'priority' => $ spiObjectState -> priority , 'mainLanguageCode' => $ spiObjectState -> defaultLanguage , 'languageCodes' => $ spiObjectState -> languageCodes , 'names' => $ spiObjectState -> name , 'descriptions' => $ spiObjectState -> description , 'objectStateGroup' => $ objectStateGroup , 'prioritizedLanguages' => $ prioritizedLanguages , ] ) ; }
Converts the object state SPI value object to API value object.

@param \eZ\Publish\SPI\Persistence\Content\ObjectState $spiObjectState
@param \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup
@param string[] $prioritizedLanguages

@return \eZ\Publish\API\Repository\Values\ObjectState\ObjectState
Converts the object state SPI value object to API value object .