PHP Class eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler

Inheritance: implements eZ\Publish\SPI\Persistence\Content\ObjectState\Handler
Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$objectStateGateway Gateway ObjectState Gateway.
$objectStateMapper Mapper ObjectState Mapper.

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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

create() public méthode

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
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState

createGroup() public méthode

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
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState\Group

delete() public méthode

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() public méthode

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

getContentCount() public méthode

Returns the number of objects which are in this state.
public getContentCount ( mixed $stateId ) : integer
$stateId mixed
Résultat integer

getContentState() public méthode

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
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState

load() public méthode

Loads an object state.
public load ( mixed $stateId ) : eZ\Publish\SPI\Persistence\Content\ObjectState
$stateId mixed
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState

loadAllGroups() public méthode

Loads all object state groups.
public loadAllGroups ( integer $offset, integer $limit ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group[]
$offset integer
$limit integer
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState\Group[]

loadByIdentifier() public méthode

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
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState

loadGroup() public méthode

Loads an object state group.
public loadGroup ( mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group
$groupId mixed
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState\Group

loadGroupByIdentifier() public méthode

Loads a object state group by identifier.
public loadGroupByIdentifier ( string $identifier ) : eZ\Publish\SPI\Persistence\Content\ObjectState\Group
$identifier string
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState\Group

loadObjectStates() public méthode

This method returns the ordered list of object states of a group.
public loadObjectStates ( mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\ObjectState[]
$groupId mixed
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState[]

setContentState() public méthode

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
Résultat boolean

setPriority() public méthode

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

update() public méthode

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
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState

updateGroup() public méthode

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
Résultat eZ\Publish\SPI\Persistence\Content\ObjectState\Group

Property Details

$objectStateGateway protected_oe property

ObjectState Gateway.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content\ObjectState $objectStateGateway
Résultat Gateway

$objectStateMapper protected_oe property

ObjectState Mapper.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content\ObjectState $objectStateMapper
Résultat Mapper