Encore\Admin\Form::prepareInsert PHP Метод

prepareInsert() защищенный Метод

Prepare input data for insert.
protected prepareInsert ( $inserts ) : array
$inserts
Результат array
    protected function prepareInsert($inserts)
    {
        $first = current($inserts);
        if (is_array($first) && Arr::isAssoc($first)) {
            $inserts = array_dot($inserts);
        }
        foreach ($inserts as $column => $value) {
            if (is_null($field = $this->getFieldByColumn($column))) {
                unset($inserts[$column]);
                continue;
            }
            if (method_exists($field, 'prepare')) {
                $inserts[$column] = $field->prepare($value);
            }
        }
        $prepared = [];
        foreach ($inserts as $key => $value) {
            array_set($prepared, $key, $value);
        }
        return $prepared;
    }