public function loadAllGroups($offset = 0, $limit = -1) { $data = $this->objectStateGateway->loadObjectStateGroupListData($offset, $limit); return $this->objectStateMapper->createObjectStateGroupListFromData($data); }
/** * Returns an array of default content states with content state group id as key. * * @return \eZ\Publish\SPI\Persistence\Content\ObjectState[] */ protected function getDefaultContentStates() { $defaultObjectStatesMap = array(); foreach ($this->objectStateHandler->loadAllGroups() as $objectStateGroup) { foreach ($this->objectStateHandler->loadObjectStates($objectStateGroup->id) as $objectState) { // Only register the first object state which is the default one. $defaultObjectStatesMap[$objectStateGroup->id] = $objectState; break; } } return $defaultObjectStatesMap; }