Creates/logs in user and converts their cart.

@param array $values
The submitted form values.
330596
public function convertCustomerCart(array $values) {
    $use_ecomm_sessions = \Drupal::config('acm.commerce_users')
      ->get('use_ecomm_sessions');

    if ($use_ecomm_sessions) {
      $this->convertExternalUserCart($values);
    }
    else {
      $this->convertDrupalUserCart($values);
    }
  }
82131
public function init(array $values = [])
    {
        if ($this->app) {
            return false;
        }

        $this->app = new Application($values);

        return $this;
    }
1094084
public function insert(array $values)
    {
        $result = $this->getBuilder()->insert($values);

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

        return $result;
    }
1243114
protected function edit(array $values)
    {
        if (array_key_exists('Content', $values)) {
            $unserializedData = array();
            $serializedData = $values['Content'];
            parse_str($serializedData, $unserializedData);

            if (empty($unserializedData)) {
                return parent::edit($values);
            }

            if (!array_key_exists("al_json_block", $unserializedData)) {
                $exception = array(
                    'message' => 'exception_json_configuration_error',
                    'parameters' => array(
                        '%className%' => get_class($this),
                    ),
                );
                throw new Exception\InvalidFormConfigurationException(json_encode($exception));
            }

            $item = $unserializedData["al_json_block"];

            $content = $this->decodeJsonContent($this->alBlock);
            $content[0] = $item;

            $values['Content'] = json_encode($content);
        }

        if (array_key_exists('RemoveItem', $values)) {
            $itemId = $values['RemoveItem'];
            $content = $this->decodeJsonContent($this->alBlock);
            $this->checkValidItemId($itemId, $content);
            unset($content[$itemId]);
            $content = array_values($content);

            $values['Content'] = json_encode($content);
        }

        return parent::edit($values);
    }
71781
public function saveRole(array $values): int
    {
        $result = $this->generalSave($values, $this->tableRole);
        $this->cache->clean([Cache::TAGS => ['DibiDriver']]);
        return $result;
    }
124385
public function insert(array $values)
    {
        // Since every insert gets treated like a batch insert, we will make sure the
        // bindings are structured in a way that is convenient when building these
        // inserts statements by verifying these elements are actually an array.
        if (empty($values)) {
            return true;
        }

        if (! is_array(reset($values))) {
            $values = [$values];
        }

        // Here, we will sort the insert keys for every record so that each insert is
        // in the same order for the record. We need to make sure this is the case
        // so there are not any errors or problems when inserting these records.
        else {
            foreach ($values as $key => $value) {
                ksort($value);

                $values[$key] = $value;
            }
        }

        // Finally, we will run this query against the database connection and return
        // the results. We will need to also flatten these bindings before running
        // the query so they are all in one huge, flattened array for execution.
        $compiledInsert = $this->grammar->compileInsert($this, $values);

        return $this->connection->insert(
            $compiledInsert,
            $this->cleanBindings(Arr::flatten($values, 1))
        );
    }
660744
public function setValues($values=array()) {
		$count=$this->count();
		if (\is_array($values) === false) {
			$values=\array_fill(0, $count, $values);
		} else {
			if (JArray::isAssociative($values) === true) {
				$values=\array_values($values);
			}
		}
		$count=\min(\sizeof($values), $count);
		
		for($i=0; $i < $count; $i++) {
			$cell=$this->content[$i];
			$cell->setValue($values[$i]);
		}
	}
980588
public function submitForm(array $values)
    {
        $this->value = isset($values[$this->name]) ? $values[$this->name] : null;
    }
283114
public function setValues(array $values)
    {
        foreach ($values as $value) {
            if (false === is_scalar($value)) {
                throw InvalidArgumentException::create(
                    'Non-scalar values (such as %s) are not supported.',
                    gettype($value)
                );
            }
        }

        $this->values = $values;
    }
763102
public function add(...$values)
    {
        foreach ($values as $value) {
            $this->table->put($value, null);
        }
    }
460105
public function values($values) {
		if (is_array($values))
			$this->value = $values;
		else
			$this->valueList = func_get_args();
		return $this;
	}
642194
public function setFields($values)
    {
        foreach ($values as $field => $value) {
            $this->setField($field, $value);
        }
    }
1361913
public function save(array $values)
    {
        // Log values in a notice but without the password.
        $copy = $values;
        if (!empty($copy[Tag::Password])) {
            $copy[Tag::Password] = 'REMOVED FOR SECURITY';
        }
        $this->log->notice('ConfigStore::save(): saving %s', serialize($copy));

        // Remove password if not sent along. We have had some reports that
        // passwords were gone missing, perhaps some shops do not send the value
        // of password fields to the client???
        if (array_key_exists(Tag::Password, $values) && empty($values[Tag::Password])) {
            unset($values[Tag::Password]);
        }

        // As we have 2 setting screens, but also with updates, not all settings
        // will be passed in: complete with other settings.
        $this->load();
        $values = array_merge($this->values, $values);
        $values = $this->castValues($values);
        $values = $this->removeValuesNotToBeStored($values);
        $result = $this->getConfigStore()->save($values);
        $this->isConfigurationLoaded = false;
        // Sync internal values.
        $this->load();
        return $result;
    }
316674
protected function add(array $values)
    {
        $values =
            $this->dispatchBeforeOperationEvent(
                '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Block\BeforeBlockAddingEvent',
                BlockEvents::BEFORE_ADD_BLOCK,
                $values,
                'exception_block_adding_aborted'
            );

        $this->validator->checkEmptyParams($values);
        $requiredParameters = array("PageId" => "", "LanguageId" => "", "SlotName" => "");
        $this->validator->checkRequiredParamsExists($requiredParameters, $values);

        // When the Content is null the dafault text is inserted
        if (!array_key_exists('Content', $values)) {
            $defaults = $this->getDefaultValue();
            if (!is_array($defaults)) {
                $exception = array(
                    'message' => 'exception_method_returns_invalid_value',
                    'parameters' => array(
                        '%className%' => get_class($this),
                    ),
                );
                throw new General\InvalidArgumentTypeException(json_encode($exception));
            }

            $mergedValues = array_merge($values, $defaults);
            $availableOptions = array(
                'Content' => '',
                'InternalJavascript' => '',
                'ExternalJavascript' => '',
                'InternalStylesheet' => '',
                'ExternalStylesheet' => '',
            );
            $this->validator->checkOnceValidParamExists($availableOptions, $mergedValues);
            $values = $mergedValues;
        }

        try {
            $this->blockRepository->startTransaction();

            // Saves the content
            if (null === $this->alBlock) {
                $className = $this->blockRepository->getRepositoryObjectClassName();
                $this->alBlock = new $className();
            }

            $values = $this->checkCreatedAt($values);
            $result = $this->blockRepository
                    ->setRepositoryObject($this->alBlock)
                    ->save($values);
            if (false !== $result) {
                $this->blockRepository->commit();
                $this->eventsHandler
                     ->createEvent(BlockEvents::AFTER_ADD_BLOCK, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Block\AfterBlockAddedEvent', array($this))
                     ->dispatch();

                return $result;
            }

            $this->blockRepository->rollBack();

            return $result;
        } catch (\Exception $e) {
            if (isset($this->blockRepository) && $this->blockRepository !== null) {
                $this->blockRepository->rollBack();
            }

            throw $e;
        }
    }
148342
public function setValues($values) {

		if(false === is_array($values)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($values)), E_USER_ERROR);
		}

		$this -> values = $values;

		return $this;
	}
1241397
public function insert(array $values): bool {
    $this->coerceDataTypesToDatabase($values);
    return $this->builder->insert($values);
  }
227490
public function createItem( array $values = [] )
	{
		$values['customer.siteid'] = $this->getContext()->getLocale()->getSiteId();
		return $this->createItemBase( $values );
	}