Save a new entity using the given values

@param array $values
@throws CreateException
@throws \Doctrine\DBAL\DBALException
@return $this
332202
public function save(array $values)
    {
        if (!$this->isSavable()) {
            throw new CreateException('Permission denied: Entity can not be saved');
        }

        $this->transactional(function () use ($values) {
            $this->forceSave($values);
        });

        return $this;
    }
607635
public function withValues(array $values) : self
    {
        $new = clone $this;
        foreach ($values as $property => $value) {
            $new->data[$property] = $value;
        }

        return $new;
    }
1249142
public function bindValues($values)
    {
        $this->prepare();

        foreach ($values as $k => $value) {
            $this->statement->bindValue($k, $value);
        }

        return $this;
    }
1307351
public function values(array $values)
    {
        foreach( $values as $k => $v ) {
            $this->value($k, $v);
        }
        return $this;
    }
1353077
public function updateOrCreate(array $attributes, array $values = [])
    {
        $instance = $this->firstOrNew($attributes);

        $instance->fill($values);

        $instance->save();

        return $instance;
    }
1034254
public function saveForm(
    $entity,
        ArrayHash $values
    )
    {
        $entity = $this->repository->fillData($entity, $values);
        return $this->repository->saveItem($entity);
    }
944967
public function filterByIds(array $values): self
    {
        $fieldPath = Item::getPathByField('id');
        if (!empty($values)) {
            $this->filters['id'] = Filter::create(
                $fieldPath,
                $values,
                Filter::AT_LEAST_ONE,
                Filter::TYPE_FIELD
            );
        } else {
            unset($this->filters['id']);
        }

        return $this;
    }
227490
public function createItem( array $values = [] )
	{
		$values['customer.siteid'] = $this->getContext()->getLocale()->getSiteId();
		return $this->createItemBase( $values );
	}
298657
public function setValues(array $values)
    {
        $this->getValidator()->validateRequired($values, $this->required);
        $this->values = array_merge($this->values, $values);
        
        return $this;
    }
1209284
public function setValues(array $values) {
		$this->_data     = $values + $this->_data;
		$this->_changed += array_fill_keys(array_keys($values), true);
		
		return $this;
	}
1099053
public function addAll($values)
    {
        if (!WF::is_array_like($values))
            throw new \DomainException("Invalid value to merge: " . WF::str($values));
        $this->addAllRecursive($values, $this);
        return $this;
    }
422313
public function intoValues(array $values)
    {
        if (is_array($values[0])) {
            $this->intoValues = $values;
        } else {
            $this->intoValues[] = $values;
        }
        return $this;
    }
1094084
public function insert(array $values)
    {
        $result = $this->getBuilder()->insert($values);

        // Reset query builder
        $this->resetBuilder();

        return $result;
    }
67255
public function setDefinedValues(array $values)
    {
        foreach ($this->_definition as $key => $value) {
            $this->setOptionalValueInArray($key, $values);

            if (!array_key_exists($key, $values)) {
                throw new Exception ('Value is missing for "' . $key . '"');
            }

            $this->$key = $values[$key];
        }

        return $this;
    }
1098669
public function addValues(array $values = [])
    {
        $this->assertCanHaveMultipleValues();

        foreach ($values as $value) {
            $this->addValue($value);
        }

        return $this;
    }
579896
public static function createFromValues(array $values)
    {
        if (\array_key_exists('keys', $values) && \is_array($values['keys'])) {
            return JWKSet::createFromKeyData($values);
        }

        return JWK::create($values);
    }
1204008
public function values($values)
    {
        if(!$values instanceof DatabaseQuerySelect)
        {
            if (!$this->columns && !is_numeric(key($values))) {
                $this->columns(array_keys($values));
            }

            $this->values[] = array_values($values);
        }
        else $this->values = $values;

        return $this;
    }