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

loadObjectStates() public method

This method returns the ordered list of object states of a group.
public loadObjectStates ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState[]
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
return eZ\Publish\API\Repository\Values\ObjectState\ObjectState[]
    public function loadObjectStates(APIObjectStateGroup $objectStateGroup)
    {
        $spiObjectStates = $this->objectStateHandler->loadObjectStates($objectStateGroup->id);
        $objectStates = array();
        foreach ($spiObjectStates as $spiObjectState) {
            $objectStates[] = $this->buildDomainObjectStateObject($spiObjectState, $objectStateGroup);
        }
        return $objectStates;
    }