public function getObjectStatesForContent($contentId)
    {
        $groups = $this->objectStateService->loadObjectStateGroups();
        $contentInfo = $this->contentService->loadContentInfo($contentId);

        $contentObjectStates = array();

        foreach ($groups as $group) {
            try {
                $state = $this->objectStateService->getContentState($contentInfo, $group);
                $contentObjectStates[] = new RestObjectState($state, $group->id);
            } catch (NotFoundException $e) {
                // Do nothing
            }
        }

        return new ContentObjectStates($contentObjectStates);
    }
public function getObjectStatesForContent($contentId)
    {
        $groups = $this->objectStateService->loadObjectStateGroups();
        $contentInfo = $this->contentService->loadContentInfo($contentId);

        $contentObjectStates = array();

        foreach ($groups as $group) {
            try {
                $state = $this->objectStateService->getContentState($contentInfo, $group);
                $contentObjectStates[] = new RestObjectState($state, $group->id);
            } catch (NotFoundException $e) {
                // Do nothing
            }
        }

        return new ContentObjectStates($contentObjectStates);
    }
public function getObjectStatesForContent ( $ contentId ) { $ groups = $ this -> objectStateService -> loadObjectStateGroups ( ) ; $ contentInfo = $ this -> contentService -> loadContentInfo ( $ contentId ) ; $ contentObjectStates = array ( ) ; foreach ( $ groups as $ group ) { try { $ state = $ this -> objectStateService -> getContentState ( $ contentInfo , $ group ) ; $ contentObjectStates [ ] = new RestObjectState ( $ state , $ group -> id ) ; } catch ( NotFoundException $ e ) { // Do nothing } } return new ContentObjectStates ( $ contentObjectStates ) ; }
Returns the object states of content.

@param $contentId

@return \eZ\Publish\Core\REST\Common\Values\ContentObjectStates
Returns the object states of content .