ObjectStateService service.
                                                
    
        Tags
        
    
    
                                                - 
                    Example
                
 
                - 
                                                                                                             
        
Examples/objectstates.php tbd.
    
                                     
                                                                                    
    
    
    
        Methods
            
    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.
    
    Parameters
    
    Return values
    ObjectState
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                UnauthorizedException
                                                                                         
        
if the user is not allowed to create an object state
    
                                     
                            - 
                    Throws
                
 
                - 
                                                                InvalidArgumentException
                                                                                         
        
if the object state with provided identifier already exists in the same group
    
                                     
                                                                                    
            
    Creates a new object state group.
    
    Parameters
    
    Return values
    ObjectStateGroup
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                UnauthorizedException
                                                                                         
        
if the user is not allowed to create an object state group
    
                                     
                            - 
                    Throws
                
 
                - 
                                                                InvalidArgumentException
                                                                                         
        
if the object state group with provided identifier already exists
    
                                     
                                                                                    
            
    Deletes a object state. The state of the content objects is reset to the
first object state in the group.
    
        
            
                | 
                    
                 | 
                
                    
                        public deleteObjectState(ObjectState $objectState) : void 
                     
                 | 
            
        
    
 
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $objectState
                     | 
                    
                        ObjectState
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                    
    
                                                
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                UnauthorizedException
                                                                                         
        
if the user is not allowed to delete an object state
    
                                     
                                                                                    
            
    Deletes a object state group including all states and links to content.
    
    Parameters
    
                                                
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                UnauthorizedException
                                                                                         
        
if the user is not allowed to delete an object state group
    
                                     
                                                                                    
            
    Returns the number of objects which are in this state.
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $objectState
                     | 
                    
                        ObjectState
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                    
    
    Return values
    int
                        
            
    Gets the object-state of object identified by $contentId.
    
    
        The $state is the id of the state within one group.
    
    Parameters
    
    Return values
    ObjectState
                        
            
    Loads an object state.
    
        
            
                | 
                    
                 | 
                
                    
                        public loadObjectState(mixed $stateId[, array<string|int, string> $prioritizedLanguages = [] ]) : ObjectState 
                     
                 | 
            
        
    
 
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $stateId
                     | 
                    
                        mixed
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                            
                    | 
                        $prioritizedLanguages
                     | 
                    
                        array<string|int, string>
                     | 
                    
                                                                                    []
                                                                         | 
                    
                                                        
         Used as prioritized language code on translated properties of returned object. 
    
                                             | 
                
                    
    
    Return values
    ObjectState
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                NotFoundException
                                                                                         
        
if the state was not found
    
                                     
                                                                                    
            
    Loads an object state by identifier and group it belongs to.
    
        
            
                | 
                    
                 | 
                
                    
                        public loadObjectStateByIdentifier(ObjectStateGroup $objectStateGroup, string $objectStateIdentifier[, array<string|int, string> $prioritizedLanguages = [] ]) : ObjectState 
                     
                 | 
            
        
    
 
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $objectStateGroup
                     | 
                    
                        ObjectStateGroup
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                            
                    | 
                        $objectStateIdentifier
                     | 
                    
                        string
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                            
                    | 
                        $prioritizedLanguages
                     | 
                    
                        array<string|int, string>
                     | 
                    
                                                                                    []
                                                                         | 
                    
                                                        
         Used as prioritized language code on translated properties of returned object. 
    
                                             | 
                
                    
    
    Return values
    ObjectState
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                NotFoundException
                                                                                         
        
if the state was not found
    
                                     
                                                                                    
            
    Loads a object state group.
    
        
            
                | 
                    
                 | 
                
                    
                        public loadObjectStateGroup(mixed $objectStateGroupId[, array<string|int, string> $prioritizedLanguages = [] ]) : ObjectStateGroup 
                     
                 | 
            
        
    
 
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $objectStateGroupId
                     | 
                    
                        mixed
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                            
                    | 
                        $prioritizedLanguages
                     | 
                    
                        array<string|int, string>
                     | 
                    
                                                                                    []
                                                                         | 
                    
                                                        
         Used as prioritized language code on translated properties of returned object. 
    
                                             | 
                
                    
    
    Return values
    ObjectStateGroup
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                NotFoundException
                                                                                         
        
if the group was not found
    
                                     
                                                                                    
            
    Loads a object state group by identifier.
    
        
            
                | 
                    
                 | 
                
                    
                        public loadObjectStateGroupByIdentifier(string $objectStateGroupIdentifier[, array<string|int, string> $prioritizedLanguages = [] ]) : ObjectStateGroup 
                     
                 | 
            
        
    
 
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $objectStateGroupIdentifier
                     | 
                    
                        string
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                            
                    | 
                        $prioritizedLanguages
                     | 
                    
                        array<string|int, string>
                     | 
                    
                                                                                    []
                                                                         | 
                    
                                                        
         Used as prioritized language code on translated properties of returned object. 
    
                                             | 
                
                    
    
    Return values
    ObjectStateGroup
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                NotFoundException
                                                                                         
        
if the group was not found
    
                                     
                                                                                    
            
    Loads all object state groups.
    
        
            
                | 
                    
                 | 
                
                    
                        public loadObjectStateGroups([int $offset = 0 ][, int $limit = -1 ][, array<string|int, string> $prioritizedLanguages = [] ]) : array<string|int, ObjectStateGroup> 
                     
                 | 
            
        
    
 
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $offset
                     | 
                    
                        int
                     | 
                    
                                                                                    0
                                                                         | 
                    
                                                    -
                                             | 
                
                            
                    | 
                        $limit
                     | 
                    
                        int
                     | 
                    
                                                                                    -1
                                                                         | 
                    
                                                    -
                                             | 
                
                            
                    | 
                        $prioritizedLanguages
                     | 
                    
                        array<string|int, string>
                     | 
                    
                                                                                    []
                                                                         | 
                    
                                                        
         Used as prioritized language code on translated properties of returned object. 
    
                                             | 
                
                    
    
    Return values
    array<string|int, ObjectStateGroup>
                        
            
    This method returns the ordered list of object states of a group.
    
        
            
                | 
                    
                 | 
                
                    
                        public loadObjectStates(ObjectStateGroup $objectStateGroup[, array<string|int, string> $prioritizedLanguages = [] ]) : array<string|int, ObjectState> 
                     
                 | 
            
        
    
 
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $objectStateGroup
                     | 
                    
                        ObjectStateGroup
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                            
                    | 
                        $prioritizedLanguages
                     | 
                    
                        array<string|int, string>
                     | 
                    
                                                                                    []
                                                                         | 
                    
                                                        
         Used as prioritized language code on translated properties of returned object. 
    
                                             | 
                
                    
    
    Return values
    array<string|int, ObjectState>
                        
            
    Instantiates a new Object State Create Struct and sets $identifier in it.
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $identifier
                     | 
                    
                        string
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                    
    
    Return values
    ObjectStateCreateStruct
                        
            
    Instantiates a new Object State Group Create Struct and sets $identified in it.
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $identifier
                     | 
                    
                        string
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                    
    
    Return values
    ObjectStateGroupCreateStruct
                        
            
    Instantiates a new Object State Group Update Struct.
    
    Return values
    ObjectStateGroupUpdateStruct
                        
            
    Instantiates a new Object State Update Struct.
    
    Return values
    ObjectStateUpdateStruct
                        
            
    Sets the object-state of a state group to $state for the given content.
    
    Parameters
    
                                                
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                InvalidArgumentException
                                                                                         
        
if the object state does not belong to the given group
    
                                     
                            - 
                    Throws
                
 
                - 
                                                                UnauthorizedException
                                                                                         
        
if the user is not allowed to change the object state
    
                                     
                                                                                    
            
    Changes the priority of the state.
    
        
            
                | 
                    
                 | 
                
                    
                        public setPriorityOfObjectState(ObjectState $objectState, int $priority) : void 
                     
                 | 
            
        
    
 
    
    Parameters
    
        
            
                | Name | 
                Type | 
                Default value | 
                Description | 
            
        
        
                            
                    | 
                        $objectState
                     | 
                    
                        ObjectState
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                            
                    | 
                        $priority
                     | 
                    
                        int
                     | 
                    
                                                    -
                                             | 
                    
                                                    -
                                             | 
                
                    
    
                                                
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                UnauthorizedException
                                                                                         
        
if the user is not allowed to change priority on an object state
    
                                     
                                                                                    
            
    Updates an object state.
    
    Parameters
    
    Return values
    ObjectState
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                InvalidArgumentException
                                                                                         
        
if the object state with provided identifier already exists in the same group
    
                                     
                            - 
                    Throws
                
 
                - 
                                                                UnauthorizedException
                                                                                         
        
if the user is not allowed to update an object state
    
                                     
                                                                                    
            
    Updates an object state group.
    
    Parameters
    
    Return values
    ObjectStateGroup
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
 
                - 
                                                                UnauthorizedException
                                                                                         
        
if the user is not allowed to update an object state group
    
                                     
                            - 
                    Throws
                
 
                - 
                                                                InvalidArgumentException
                                                                                         
        
if the object state group with provided identifier already exists