Creates a new object state group.

@param \eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input

@return \eZ\Publish\SPI\Persistence\Content\ObjectState\Group
175271
public function createGroup(InputStruct $input)
    {
        $objectStateGroup = $this->objectStateMapper->createObjectStateGroupFromInputStruct($input);
        $this->objectStateGateway->insertObjectStateGroup($objectStateGroup);

        return $objectStateGroup;
    }
1295525
public function spitOutHtmlForModelInputToConsume($type, $input)
    {
        if ($type === 'select') {
            return $this->select([
                'default_text' => 'Please select a '.trim($input, '_id'),
                'type'         => $type,
                'name'         => $input,
            ], [
                false => 'No',
                true  => 'Yes',
            ]);
        } elseif (in_array($type, ['text', 'file', 'password', 'email', 'date', 'number'])) {
            return $this->input([
                'type'  => $type,
                'name'  => $input,
                'class' => 'form-control',
                'id'    => $this->genId($input),
                'value' => !method_exists($this->model, $input) && in_array($input, $this->model->getFillable())? $this->model->$input:  ''
            ]);
        }

        return $this->textarea(['type' => $type, 'name' => $input, 'id' => $this->genId($input)],
            (!empty($this->model->$input) && !(stripos($input,
                        'password') !== false)) ? $this->model->$input : '');
    }
876760
public function updateOrCreate(array $input)
    {
        $this->cache->tags($this->getModel())->flush();
        return $this->repository->updateOrCreate($input);
    }
530284
public function filter($input)
    {
        $collapser = new \SalernoLabs\Collapser\CSS();
        $collapser
            ->setDeleteComments(true)
            ->setPreserveNewLines(false)
            ->setDebugMode(true);

        $this->output = $collapser->collapse($input);

        return $this;
    }
438795
public function firstOrCreate(array $input)
    {
        $this->cache->tags($this->getModel())->flush();
        return $this->repository->firstOrCreate($input);
    }
238663
public function store($input)
    {
        $this->model = $this->model->fill($input);

        $filteredInput = $this->runChecks('store', $this->model->toArray());

        if ($filteredInput) {
            $this->model->fill($filteredInput);
        }

        return $this->model->save();
    }
808913
protected function createViews($input)
    {
        if (!$this->option('without-views')) {
            $this->call(
                'create:views',
                [
                    'model-name' => $input->modelName,
                    '--resource-file' => $input->resourceFile,
                    '--views-directory' => $input->viewsDirectory,
                    '--routes-prefix' => $input->prefix,
                    '--layout-name' => $input->layoutName,
                    '--template-name' => $input->template,
                    '--force' => $input->force,
                ]
            );
        }

        return $this;
    }
1180282
public function prepare($input)
    {
        foreach ($input as $key => $record) {
            $this->setFieldOriginalValue($key);
            $input[$key] = $this->prepareRecord($record);
        }

        return $input;
    }
365680
public function after($input): self {
        $this->manipulateNodesWithInput($input, function($node, $newNodes) {
            foreach ($newNodes as $newNode) {
                if (is_null($node->following())) {
                    $node->parent()->appendChild($newNode);
                } else {
                    $node->parent()->insertBefore($newNode, $node->following());
                }
            }
        });

        return $this;
    }
754224
protected function buildInputDefinition() : InputDefinition
    {
        return new InputDefinition(
            [
                new InputOption(
                    'target',
                    't',
                    InputOption::VALUE_REQUIRED,
                    'Finds Files which have changed since the current branch parted from the target branch '
                    . 'only. The Value has to be a commit-ish.',
                    false
                ),
                new InputOption(
                    'auto-target',
                    'a',
                    InputOption::VALUE_NONE,
                    'Finds Files which have changed since the current branch parted from the parent branch '
                    . 'only. It tries to find the parent branch by automagic.'
                ),
                new InputOption(
                    'fix',
                    'f',
                    InputOption::VALUE_NONE,
                    'Runs tool to try to fix violations automagically.'
                ),
                new InputOption(
                    'process-isolation',
                    'p',
                    InputOption::VALUE_NONE,
                    'Runs all checks in separate processes. Slow but not as resource hungry.'
                ),
            ]
        );
    }
1064649
public function input($input): ProcessBuilder
    {
        if ($input === null) {
            $this->input = null;

            return $this;
        }

        if (is_resource($input)) {
            $this->input = $input;

            return $this;
        }

        if (is_scalar($input)) {
            $this->input = (string) $input;
        }

        return $this;
    }
672107
private function determineStartState(InputInterface $input, string $state_name = null): StateInterface
    {
        if (!$state_name) {
            return $this->getInitialState();
        }
        if (!$this->states->has($state_name)) {
            throw new ExecutionError("Trying to start statemachine execution at unknown state: ".$state_name);
        }
        $start_state = $this->states->get($state_name);
        if ($start_state->isFinal()) {
            throw new ExecutionError("Trying to (re)execute statemachine at final state: ".$state_name);
        }
        if ($start_state->isInteractive() && !$input->hasEvent()) {
            throw new ExecutionError("Trying to resume statemachine executing without providing an event/signal.");
        }
        return $start_state->isInteractive()
            ? $this->activateTransition($input, Output::fromInput($start_state->getName(), $input))
            : $start_state;
    }
1322371
public function replaceWith($input): self {
        $this->manipulateNodesWithInput($input, function($node, $newNodes) {
            foreach ($newNodes as $newNode) {
                $node->parent()->replaceChild($newNode, $node);
            }
        });

        return $this;
    }
529224
public function findOrCreate($input)
    {
        if (is_null($input)) {
            return $input;
        }

        if (is_string($input) && is_object(json_decode($input)) && is_array(json_decode($input, true))) {
            $input = json_decode($input, true);
        }

        if (is_array($input)) {
            if (array_key_exists('id', $input) && $input['id']) {
                $object = $this->find($input['id']);
            } else {
                $object = $this->createEntity();
            }

            $object->setPropertiesEntity($input);

            return $object;
        }

        if (is_numeric($input) || is_string($input)) {
            return $this->find($input);
        }

        throw new \InvalidArgumentException('O parâmetro $input pode ser um null | string | array | numeric');
    }
16828
public function before($input): self {
        $this->manipulateNodesWithInput($input, function($node, $newNodes) {
            foreach ($newNodes as $newNode) {
                $node->parent()->insertBefore($newNode, $node);
            }
        });

        return $this;
    }
842899
private function fromCompactSerializationToSerialization($input)
    {
        $parts = explode('.', $input);
        switch (count($parts)) {
            case 3:
                return $this->fromCompactSerializationSignatureToSerialization($parts);
            case 5:
                return $this->fromCompactSerializationRecipientToSerialization($parts);
            default:
                throw new \InvalidArgumentException('Unsupported input');
        }
    }
608407
public static function create(array $input = [])
    {
        DB::beginTransaction();

        try {
            LaravelEvent::fire(static::$name.'.creating');
            static::beforeCreate($input);
            $return = parent::create($input);
            static::afterCreate($input, $return);
            LaravelEvent::fire(static::$name.'.created');

            DB::commit();
        } catch (\Exception $e) {
            DB::rollBack();
            throw $e;
        }

        return $return;
    }