PHP Класс eZ\Publish\Core\Repository\ObjectStateService

Наследование: implements eZ\Publish\API\Repository\ObjectStateService
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$objectStateHandler eZ\Publish\SPI\Persistence\Content\ObjectState\Handler
$repository eZ\Publish\API\Repository\Repository
$settings array

Открытые методы

Метод Описание
__construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Content\ObjectState\Handler $objectStateHandler, array $settings = [] ) Setups service with reference to repository object that created it & corresponding handler.
createObjectState ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct $objectStateCreateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState Creates a new object state in the given group.
createObjectStateGroup ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupCreateStruct $objectStateGroupCreateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup Creates a new object state group.
deleteObjectState ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState ) Deletes a object state. The state of the content objects is reset to the first object state in the group.
deleteObjectStateGroup ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup ) Deletes a object state group including all states and links to content.
getContentCount ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState ) : integer Returns the number of objects which are in this state.
getContentState ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState Gets the object-state of object identified by $contentId.
loadObjectState ( mixed $stateId ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState Loads an object state.
loadObjectStateGroup ( mixed $objectStateGroupId ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup Loads a object state group.
loadObjectStateGroups ( integer $offset, integer $limit ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup[] Loads all object state groups.
loadObjectStates ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState[] This method returns the ordered list of object states of a group.
newObjectStateCreateStruct ( string $identifier ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct Instantiates a new Object State Create Struct and sets $identifier in it.
newObjectStateGroupCreateStruct ( string $identifier ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupCreateStruct Instantiates a new Object State Group Create Struct and sets $identified in it.
newObjectStateGroupUpdateStruct ( ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct Instantiates a new Object State Group Update Struct.
newObjectStateUpdateStruct ( ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateUpdateStruct Instantiates a new Object State Update Struct.
setContentState ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState ) Sets the object-state of a state group to $state for the given content.
setPriorityOfObjectState ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState, integer $priority ) Changes the priority of the state.
updateObjectState ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateUpdateStruct $objectStateUpdateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState Updates an object state.
updateObjectStateGroup ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup Updates an object state group.

Защищенные методы

Метод Описание
buildCreateInputStruct ( string $identifier, string $defaultLanguageCode, string[] $names, string[] $descriptions ) : eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct Validates input for creating object states/groups and builds the InputStruct object.
buildDomainObjectStateGroupObject ( eZ\Publish\SPI\Persistence\Content\ObjectState\Group $spiObjectStateGroup ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup Converts the object state group SPI value object to API value object.
buildDomainObjectStateObject ( eZ\Publish\SPI\Persistence\Content\ObjectState $spiObjectState, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup = null ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState Converts the object state SPI value object to API value object.
buildObjectStateGroupUpdateInputStruct ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, string $identifier, string $defaultLanguageCode, string[] $names, string[] $descriptions ) : eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct Validates input for updating object state groups and builds the InputStruct object.
buildObjectStateUpdateInputStruct ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState, string $identifier, string $defaultLanguageCode, string[] $names, string[] $descriptions ) : eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct Validates input for updating object states and builds the InputStruct object.

Описание методов

__construct() публичный Метод

Setups service with reference to repository object that created it & corresponding handler.
public __construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Content\ObjectState\Handler $objectStateHandler, array $settings = [] )
$repository eZ\Publish\API\Repository\Repository
$objectStateHandler eZ\Publish\SPI\Persistence\Content\ObjectState\Handler
$settings array

buildCreateInputStruct() защищенный Метод

Validates input for creating object states/groups and builds the InputStruct object.
protected buildCreateInputStruct ( string $identifier, string $defaultLanguageCode, string[] $names, string[] $descriptions ) : eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct
$identifier string
$defaultLanguageCode string
$names string[]
$descriptions string[]
Результат eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct

buildDomainObjectStateGroupObject() защищенный Метод

Converts the object state group SPI value object to API value object.
protected buildDomainObjectStateGroupObject ( eZ\Publish\SPI\Persistence\Content\ObjectState\Group $spiObjectStateGroup ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$spiObjectStateGroup eZ\Publish\SPI\Persistence\Content\ObjectState\Group
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup

buildDomainObjectStateObject() защищенный Метод

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
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectState

buildObjectStateGroupUpdateInputStruct() защищенный Метод

Validates input for updating object state groups and builds the InputStruct object.
protected buildObjectStateGroupUpdateInputStruct ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, string $identifier, string $defaultLanguageCode, string[] $names, string[] $descriptions ) : eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$identifier string
$defaultLanguageCode string
$names string[]
$descriptions string[]
Результат eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct

buildObjectStateUpdateInputStruct() защищенный Метод

Validates input for updating object states and builds the InputStruct object.
protected buildObjectStateUpdateInputStruct ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState, string $identifier, string $defaultLanguageCode, string[] $names, string[] $descriptions ) : eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct
$objectState eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$identifier string
$defaultLanguageCode string
$names string[]
$descriptions string[]
Результат eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct

createObjectState() публичный Метод

Note: in current kernel: If it is the first state all content objects will set to this state.
public createObjectState ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct $objectStateCreateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectStateCreateStruct eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectState

createObjectStateGroup() публичный Метод

Creates a new object state group.
public createObjectStateGroup ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupCreateStruct $objectStateGroupCreateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectStateGroupCreateStruct eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupCreateStruct
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup

deleteObjectState() публичный Метод

Deletes a object state. The state of the content objects is reset to the first object state in the group.
public deleteObjectState ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState )
$objectState eZ\Publish\API\Repository\Values\ObjectState\ObjectState

deleteObjectStateGroup() публичный Метод

Deletes a object state group including all states and links to content.
public deleteObjectStateGroup ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup )
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup

getContentCount() публичный Метод

Returns the number of objects which are in this state.
public getContentCount ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState ) : integer
$objectState eZ\Publish\API\Repository\Values\ObjectState\ObjectState
Результат integer

getContentState() публичный Метод

The $state is the id of the state within one group.
public getContentState ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectState

loadObjectState() публичный Метод

Loads an object state.
public loadObjectState ( mixed $stateId ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$stateId mixed
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectState

loadObjectStateGroup() публичный Метод

Loads a object state group.
public loadObjectStateGroup ( mixed $objectStateGroupId ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectStateGroupId mixed
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup

loadObjectStateGroups() публичный Метод

Loads all object state groups.
public loadObjectStateGroups ( integer $offset, integer $limit ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup[]
$offset integer
$limit integer
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup[]

loadObjectStates() публичный Метод

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
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectState[]

newObjectStateCreateStruct() публичный Метод

Instantiates a new Object State Create Struct and sets $identifier in it.
public newObjectStateCreateStruct ( string $identifier ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct
$identifier string
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct

newObjectStateGroupCreateStruct() публичный Метод

Instantiates a new Object State Group Create Struct and sets $identified in it.
public newObjectStateGroupCreateStruct ( string $identifier ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupCreateStruct
$identifier string
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupCreateStruct

newObjectStateGroupUpdateStruct() публичный Метод

Instantiates a new Object State Group Update Struct.
public newObjectStateGroupUpdateStruct ( ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct

newObjectStateUpdateStruct() публичный Метод

Instantiates a new Object State Update Struct.
public newObjectStateUpdateStruct ( ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateUpdateStruct
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectStateUpdateStruct

setContentState() публичный Метод

Sets the object-state of a state group to $state for the given content.
public setContentState ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState )
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectState eZ\Publish\API\Repository\Values\ObjectState\ObjectState

setPriorityOfObjectState() публичный Метод

Changes the priority of the state.
public setPriorityOfObjectState ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState, integer $priority )
$objectState eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$priority integer

updateObjectState() публичный Метод

Updates an object state.
public updateObjectState ( eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateUpdateStruct $objectStateUpdateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$objectState eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$objectStateUpdateStruct eZ\Publish\API\Repository\Values\ObjectState\ObjectStateUpdateStruct
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectState

updateObjectStateGroup() публичный Метод

Updates an object state group.
public updateObjectStateGroup ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectStateGroupUpdateStruct eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct
Результат eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup

Описание свойств

$objectStateHandler защищенное свойство

protected Handler,eZ\Publish\SPI\Persistence\Content\ObjectState $objectStateHandler
Результат eZ\Publish\SPI\Persistence\Content\ObjectState\Handler

$repository защищенное свойство

protected Repository,eZ\Publish\API\Repository $repository
Результат eZ\Publish\API\Repository\Repository

$settings защищенное свойство

protected array $settings
Результат array