PHP Класс eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler

Наследование: implements eZ\Publish\SPI\Persistence\Content\ObjectState\Handler
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$objectStateGateway Gateway ObjectState Gateway.
$objectStateMapper Mapper ObjectState Mapper.

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

Метод Описание
__construct ( Gateway $objectStateGateway, Mapper $objectStateMapper ) Creates a new ObjectState Handler.
create ( mixed $groupId, eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input ) : eZ\Publish\SPI\Persistence\Content\ObjectState Creates a new object state in the given group.
createGroup ( eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group Creates a new object state group.
delete ( mixed $stateId ) Deletes a object state. The state of the content objects is reset to the first object state in the group.
deleteGroup ( mixed $groupId ) Deletes a object state group including all states and links to content.
getContentCount ( mixed $stateId ) : integer Returns the number of objects which are in this state.
getContentState ( mixed $contentId, mixed $stateGroupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState Gets the object-state of object identified by $contentId.
load ( mixed $stateId ) : eZ\Publish\SPI\Persistence\Content\ObjectState Loads an object state.
loadAllGroups ( integer $offset, integer $limit ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group[] Loads all object state groups.
loadByIdentifier ( string $identifier, mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState Loads an object state by identifier and group it belongs to.
loadGroup ( mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group Loads an object state group.
loadGroupByIdentifier ( string $identifier ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group Loads a object state group by identifier.
loadObjectStates ( mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState[] This method returns the ordered list of object states of a group.
setContentState ( mixed $contentId, mixed $groupId, mixed $stateId ) : boolean Sets the object-state of a state group to $stateId for the given content.
setPriority ( mixed $stateId, integer $priority ) Changes the priority of the state.
update ( mixed $stateId, eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input ) : eZ\Publish\SPI\Persistence\Content\ObjectState Updates an object state.
updateGroup ( mixed $groupId, eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group Updates an object state group.

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

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

Creates a new ObjectState Handler.
public __construct ( Gateway $objectStateGateway, Mapper $objectStateMapper )
$objectStateGateway Gateway
$objectStateMapper Mapper

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

The new state gets the last priority. Note: in current kernel: If it is the first state all content objects will set to this state.
public create ( mixed $groupId, eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input ) : eZ\Publish\SPI\Persistence\Content\ObjectState
$groupId mixed
$input eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct
Результат eZ\Publish\SPI\Persistence\Content\ObjectState

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

Creates a new object state group.
public createGroup ( eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group
$input eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct
Результат eZ\Publish\SPI\Persistence\Content\ObjectState\Group

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

Deletes a object state. The state of the content objects is reset to the first object state in the group.
public delete ( mixed $stateId )
$stateId mixed

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

Deletes a object state group including all states and links to content.
public deleteGroup ( mixed $groupId )
$groupId mixed

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

Returns the number of objects which are in this state.
public getContentCount ( mixed $stateId ) : integer
$stateId mixed
Результат integer

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

The $state is the id of the state within one group.
public getContentState ( mixed $contentId, mixed $stateGroupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState
$contentId mixed
$stateGroupId mixed
Результат eZ\Publish\SPI\Persistence\Content\ObjectState

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

Loads an object state.
public load ( mixed $stateId ) : eZ\Publish\SPI\Persistence\Content\ObjectState
$stateId mixed
Результат eZ\Publish\SPI\Persistence\Content\ObjectState

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

Loads all object state groups.
public loadAllGroups ( integer $offset, integer $limit ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group[]
$offset integer
$limit integer
Результат eZ\Publish\SPI\Persistence\Content\ObjectState\Group[]

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

Loads an object state by identifier and group it belongs to.
public loadByIdentifier ( string $identifier, mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState
$identifier string
$groupId mixed
Результат eZ\Publish\SPI\Persistence\Content\ObjectState

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

Loads an object state group.
public loadGroup ( mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group
$groupId mixed
Результат eZ\Publish\SPI\Persistence\Content\ObjectState\Group

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

Loads a object state group by identifier.
public loadGroupByIdentifier ( string $identifier ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group
$identifier string
Результат eZ\Publish\SPI\Persistence\Content\ObjectState\Group

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

This method returns the ordered list of object states of a group.
public loadObjectStates ( mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState[]
$groupId mixed
Результат eZ\Publish\SPI\Persistence\Content\ObjectState[]

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

Sets the object-state of a state group to $stateId for the given content.
public setContentState ( mixed $contentId, mixed $groupId, mixed $stateId ) : boolean
$contentId mixed
$groupId mixed
$stateId mixed
Результат boolean

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

Changes the priority of the state.
public setPriority ( mixed $stateId, integer $priority )
$stateId mixed
$priority integer

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

Updates an object state.
public update ( mixed $stateId, eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input ) : eZ\Publish\SPI\Persistence\Content\ObjectState
$stateId mixed
$input eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct
Результат eZ\Publish\SPI\Persistence\Content\ObjectState

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

Updates an object state group.
public updateGroup ( mixed $groupId, eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group
$groupId mixed
$input eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct
Результат eZ\Publish\SPI\Persistence\Content\ObjectState\Group

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

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

ObjectState Gateway.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content\ObjectState $objectStateGateway
Результат Gateway

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

ObjectState Mapper.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content\ObjectState $objectStateMapper
Результат Mapper