eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler::create PHP Method

create() public method

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
return eZ\Publish\SPI\Persistence\Content\ObjectState
    public function create($groupId, InputStruct $input)
    {
        $objectState = $this->objectStateMapper->createObjectStateFromInputStruct($input);
        $this->objectStateGateway->insertObjectState($objectState, $groupId);
        return $objectState;
    }