# Object state events

| Event                          | Dispatched by                           | Properties                                                                                                             |
| ------------------------------ | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `BeforeCreateObjectStateEvent` | `ObjectStateService::createObjectState` | \`ObjectStateGroup $objectStateGroup`ObjectStateCreateStruct $objectStateCreateStruct`ObjectState                      |
| `CreateObjectStateEvent`       | `ObjectStateService::createObjectState` | ``` ObjectState $objectState``ObjectStateGroup $objectStateGroup``ObjectStateCreateStruct $objectStateCreateStruct ``` |
| `BeforeUpdateObjectStateEvent` | `ObjectStateService::updateObjectState` | \`ObjectState $objectState`ObjectStateUpdateStruct $objectStateUpdateStruct`ObjectState                                |
| `UpdateObjectStateEvent`       | `ObjectStateService::updateObjectState` | ``` ObjectState $updatedObjectState``ObjectState $objectState``ObjectStateUpdateStruct $objectStateUpdateStruct ```    |
| `BeforeDeleteObjectStateEvent` | `ObjectStateService::deleteObjectState` | `ObjectState $objectState`                                                                                             |
| `DeleteObjectStateEvent`       | `ObjectStateService::deleteObjectState` | `ObjectState $objectState`                                                                                             |

## Object state groups

| Event                               | Dispatched by                                | Properties                                                                                                                                        |
| ----------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BeforeCreateObjectStateGroupEvent` | `ObjectStateService::createObjectStateGroup` | \`ObjectStateGroupCreateStruct $objectStateGroupCreateStruct\`\`ObjectStateGroup                                                                  |
| `CreateObjectStateGroupEvent`       | `ObjectStateService::createObjectStateGroup` | ``` ObjectStateGroup $objectStateGroup``ObjectStateGroupCreateStruct $objectStateGroupCreateStruct ```                                            |
| `BeforeUpdateObjectStateGroupEvent` | `ObjectStateService::updateObjectStateGroup` | \`ObjectStateGroup $objectStateGroup`ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct`ObjectStateGroup                                  |
| `UpdateObjectStateGroupEvent`       | `ObjectStateService::updateObjectStateGroup` | ``` ObjectStateGroup $updatedObjectStateGroup``ObjectStateGroup $objectStateGroup``ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct ``` |
| `BeforeDeleteObjectStateGroupEvent` | `ObjectStateService::deleteObjectStateGroup` | `ObjectStateGroup $objectStateGroup`                                                                                                              |
| `DeleteObjectStateGroupEvent`       | `ObjectStateService::deleteObjectStateGroup` | `ObjectStateGroup $objectStateGroup`                                                                                                              |

## Setting states

| Event                                 | Dispatched by                                  | Properties                                                                                     |
| ------------------------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `BeforeSetContentStateEvent`          | `ObjectStateService::deleteObjectState`        | ``` ContentInfo $contentInfo``ObjectStateGroup $objectStateGroup``ObjectState $objectState ``` |
| `SetContentStateEvent`                | `ObjectStateService::deleteObjectState`        | ``` ContentInfo $contentInfo``ObjectStateGroup $objectStateGroup``ObjectState $objectState ``` |
| `BeforeSetPriorityOfObjectStateEvent` | `ObjectStateService::setPriorityOfObjectState` | ``` ObjectState $objectState``private $priority ```                                            |
| `SetPriorityOfObjectStateEvent`       | `ObjectStateService::setPriorityOfObjectState` | ``` ObjectState $objectState``private $priority ```                                            |
