Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | List of all members
eZ\Publish\API\Repository\ObjectStateService Interface Reference
Inheritance diagram for eZ\Publish\API\Repository\ObjectStateService:

## Public Member Functions
| createObjectStateGroup (ObjectStateGroupCreateStruct $objectStateGroupCreateStruct)
| Creates a new object state group. More...
| loadObjectStateGroup ($objectStateGroupId, array $prioritizedLanguages=[])
| Loads a object state group. More...
| loadObjectStateGroups ($offset=0, $limit=-1, array $prioritizedLanguages=[])
| Loads all object state groups. More...
| loadObjectStates (ObjectStateGroup $objectStateGroup, array $prioritizedLanguages=[])
| This method returns the ordered list of object states of a group. More...
| updateObjectStateGroup (ObjectStateGroup $objectStateGroup, ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct)
| Updates an object state group. More...
| deleteObjectStateGroup (ObjectStateGroup $objectStateGroup)
| Deletes a object state group including all states and links to content. More...
| createObjectState (ObjectStateGroup $objectStateGroup, ObjectStateCreateStruct $objectStateCreateStruct)
| Creates a new object state in the given group. More...
| loadObjectState ($stateId, array $prioritizedLanguages=[])
| Loads an object state. More...
| updateObjectState (ObjectState $objectState, ObjectStateUpdateStruct $objectStateUpdateStruct)
| Updates an object state. More...
| setPriorityOfObjectState (ObjectState $objectState, $priority)
| Changes the priority of the state. More...
| deleteObjectState (ObjectState $objectState)
| Deletes a object state. More...
| setContentState (ContentInfo $contentInfo, ObjectStateGroup $objectStateGroup, ObjectState $objectState)
| Sets the object-state of a state group to $state for the given content. More...
| getContentState (ContentInfo $contentInfo, ObjectStateGroup $objectStateGroup)
| Gets the object-state of object identified by $contentId. More...
| getContentCount (ObjectState $objectState)
| Returns the number of objects which are in this state. More...
| newObjectStateGroupCreateStruct ($identifier)
| Instantiates a new Object State Group Create Struct and sets $identified in it. More...
| newObjectStateGroupUpdateStruct ()
| Instantiates a new Object State Group Update Struct. More...
| newObjectStateCreateStruct ($identifier)
| Instantiates a new Object State Create Struct and sets $identifier in it. More...
| newObjectStateUpdateStruct ()
| Instantiates a new Object State Update Struct. More...

## Detailed Description

Definition at line 22 of file API/Repository/ObjectStateService.php.

## Member Function Documentation

## ◆ createObjectState()

eZ\Publish\API\Repository\ObjectStateService::createObjectState | ( | ObjectStateGroup | $objectStateGroup,
|  | ObjectStateCreateStruct | $objectStateCreateStruct
| ) |  |

Creates a new object state in the given group.

Note: in current kernel: If it is the first state all content objects will set to this state.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService.

## ◆ createObjectStateGroup()

eZ\Publish\API\Repository\ObjectStateService::createObjectStateGroup | ( | ObjectStateGroupCreateStruct | $objectStateGroupCreateStruct | ) |

Creates a new object state group.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService, and eZ\Publish\Core\Repository\ObjectStateService.

## ◆ deleteObjectState()

eZ\Publish\API\Repository\ObjectStateService::deleteObjectState | ( | ObjectState | $objectState | ) |

Deletes a object state.

The state of the content objects is reset to the first object state in the group.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService.

## ◆ deleteObjectStateGroup()

eZ\Publish\API\Repository\ObjectStateService::deleteObjectStateGroup | ( | ObjectStateGroup | $objectStateGroup | ) |

Deletes a object state group including all states and links to content.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService.

## ◆ getContentCount()

eZ\Publish\API\Repository\ObjectStateService::getContentCount | ( | ObjectState | $objectState | ) |

Returns the number of objects which are in this state.

Parameters

  \eZ\Publish\API\Repository\Values\ObjectState\ObjectState | $objectState |

Returns
  int

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService.

## ◆ getContentState()

eZ\Publish\API\Repository\ObjectStateService::getContentState | ( | ContentInfo | $contentInfo,
|  | ObjectStateGroup | $objectStateGroup
| ) |  |

Gets the object-state of object identified by $contentId.

The $state is the id of the state within one group.

Parameters

  \eZ\Publish\API\Repository\Values\Content\ContentInfo | $contentInfo |
  \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup | $objectStateGroup |

Returns
  \eZ\Publish\API\Repository\Values\ObjectState\ObjectState

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService.

## ◆ loadObjectState()

eZ\Publish\API\Repository\ObjectStateService::loadObjectState | ( |  | $stateId,
|  | array | $prioritizedLanguages = `[]`
| ) |  |

Loads an object state.

Parameters

  mixed | $stateId |
  string[] | $prioritizedLanguages | Used as prioritized language code on translated properties of returned object.

Exceptions

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService, eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\ObjectStateService.

## ◆ loadObjectStateGroup()

eZ\Publish\API\Repository\ObjectStateService::loadObjectStateGroup | ( |  | $objectStateGroupId,
|  | array | $prioritizedLanguages = `[]`
| ) |  |

Loads a object state group.

Parameters

  mixed | $objectStateGroupId |
  string[] | $prioritizedLanguages | Used as prioritized language code on translated properties of returned object.

Exceptions

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService, eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\ObjectStateService.

## ◆ loadObjectStateGroups()

eZ\Publish\API\Repository\ObjectStateService::loadObjectStateGroups | ( |  | $offset = `0`,
|  |  | $limit = `-1`,
|  | array | $prioritizedLanguages = `[]`
| ) |  |

Loads all object state groups.

Parameters

  int | $offset |
  int | $limit |
  string[] | $prioritizedLanguages | Used as prioritized language code on translated properties of returned object.

Returns
  \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup[]

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService, eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\ObjectStateService.

## ◆ loadObjectStates()

eZ\Publish\API\Repository\ObjectStateService::loadObjectStates | ( | ObjectStateGroup | $objectStateGroup,
|  | array | $prioritizedLanguages = `[]`
| ) |  |

This method returns the ordered list of object states of a group.

Parameters

  \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup | $objectStateGroup |
  string[] | $prioritizedLanguages | Used as prioritized language code on translated properties of returned object.

Returns
  \eZ\Publish\API\Repository\Values\ObjectState\ObjectState[]

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService, eZ\Publish\Core\SignalSlot\ObjectStateService, and eZ\Publish\Core\REST\Client\ObjectStateService.

## ◆ newObjectStateCreateStruct()

eZ\Publish\API\Repository\ObjectStateService::newObjectStateCreateStruct | ( |  | $identifier | ) |

Instantiates a new Object State Create Struct and sets $identifier in it.

Parameters

  string | $identifier |

Returns
  \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService, and eZ\Publish\Core\Repository\ObjectStateService.

## ◆ newObjectStateGroupCreateStruct()

eZ\Publish\API\Repository\ObjectStateService::newObjectStateGroupCreateStruct | ( |  | $identifier | ) |

Instantiates a new Object State Group Create Struct and sets $identified in it.

Parameters

  string | $identifier |

Returns
  \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupCreateStruct

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService, and eZ\Publish\Core\Repository\ObjectStateService.

## ◆ newObjectStateGroupUpdateStruct()

eZ\Publish\API\Repository\ObjectStateService::newObjectStateGroupUpdateStruct | ( |  | ) |

Instantiates a new Object State Group Update Struct.

Returns
  \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService, and eZ\Publish\Core\Repository\ObjectStateService.

## ◆ newObjectStateUpdateStruct()

eZ\Publish\API\Repository\ObjectStateService::newObjectStateUpdateStruct | ( |  | ) |

Instantiates a new Object State Update Struct.

Returns
  \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateUpdateStruct

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService, and eZ\Publish\Core\Repository\ObjectStateService.

## ◆ setContentState()

eZ\Publish\API\Repository\ObjectStateService::setContentState | ( | ContentInfo | $contentInfo,
|  | ObjectStateGroup | $objectStateGroup,
|  | ObjectState | $objectState
| ) |  |

Sets the object-state of a state group to $state for the given content.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService.

## ◆ setPriorityOfObjectState()

eZ\Publish\API\Repository\ObjectStateService::setPriorityOfObjectState | ( | ObjectState | $objectState,
|  |  | $priority
| ) |  |

Changes the priority of the state.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService.

## ◆ updateObjectState()

eZ\Publish\API\Repository\ObjectStateService::updateObjectState | ( | ObjectState | $objectState,
|  | ObjectStateUpdateStruct | $objectStateUpdateStruct
| ) |  |

Updates an object state.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService.

## ◆ updateObjectStateGroup()

eZ\Publish\API\Repository\ObjectStateService::updateObjectStateGroup | ( | ObjectStateGroup | $objectStateGroup,
|  | ObjectStateGroupUpdateStruct | $objectStateGroupUpdateStruct
| ) |  |

Updates an object state group.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ObjectStateService, eZ\Publish\Core\REST\Client\ObjectStateService, and eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService.

The documentation for this interface was generated from the following file:

- API/Repository/ObjectStateService.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.