eZ\Publish\Core\SignalSlot\ObjectStateService::createObjectState PHP Method

createObjectState() public method

Note: in current kernel: If it is the first state all content objects will set to this state.
public createObjectState ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct $objectStateCreateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectState
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectStateCreateStruct eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct
return eZ\Publish\API\Repository\Values\ObjectState\ObjectState
    public function createObjectState(ObjectStateGroup $objectStateGroup, ObjectStateCreateStruct $objectStateCreateStruct)
    {
        $returnValue = $this->service->createObjectState($objectStateGroup, $objectStateCreateStruct);
        $this->signalDispatcher->emit(new CreateObjectStateSignal(array('objectStateGroupId' => $objectStateGroup->id, 'objectStateId' => $returnValue->id)));
        return $returnValue;
    }