Set form options.

@param array $options

@return FieldTypeInterface
960001
public function setOptions(array $options): FieldTypeInterface
    {
        $this->validateOptions($options);
        $this->options = $this->parseOptions(array_merge(
            $this->getDefaultOptions(),
            $this->options,
            $options
        ));

        return $this;
    }
715328
public function setOptions(array $options): Control
    {
        if (array_key_exists('name', $options)) {
            $this->setName($options['name']);
        }

        if (array_key_exists('classes', $options)) {
            $this->addClasses(...(array)$options['classes']);
        }

        if (array_key_exists('rule', $options)) {
            $this->setRule($options['rule']);
        }

        if (array_key_exists('value', $options)) {
            $this->setValue((string)$options['value']);
        }

        if (array_key_exists('messages', $options)) {
            $this->setMessages($options['messages']);
        }

        if (array_key_exists('label', $options)) {
            $this->setLabel($options['label']);
        }

        if (array_key_exists('attributes', $options)) {
            $this->addAttributes((array)$options['attributes']);
        }

        if (array_key_exists('group', $options)) {
            $this->setGroup($options['group']);
        } else {
            $this->setGroup('*');
        }

        $this->options = $options;

        return $this;
    }
1023168
public function setOptions($options)
        {
            if(!is_array($options)) {
                throw new \Thin\Exception(get_class() . ": " . __METHOD__ . " expects an array as parametre, " . gettype($options) . " given.");
            }

            foreach($options as $option => $value) {
                $this->setOption($option, $value);
            }

            return $this;
        }
984123
protected function setDefaultOptions(array $options = [])
    {
        $this->options = $this->formHelper->mergeOptions($this->allDefaults(), $this->getDefaults());
        $this->options = $this->prepareOptions($options);
    }
205457
public function setOptions(array $options)
    {
        $this->options = [];

        foreach ($options as $k => $v) {
            $this->addOption($k, (array)$v);
        }

        return $this;
    }
349666
public function setOptions(array $options)
    {
        if ($options) {
            foreach ($options as $k => $v) {
                if (in_array($k, ['session'])) {
                    $this->getTokenInstance()->setOptions($k, $v);
                }
            }
            
            $this->getImageHandler()->setOptions($options);
        }
        
        return $this;
    }
407210
protected function resolveFieldOptionValues(array $options)
    {
        foreach ($options as &$value) {
            if (!is_array($value)) {
                continue;
            }
            if (is_callable($value)) {
                $value = $value();

                continue;
            }

            $value = $this->resolveFieldOptionValues($value);
        }

        unset($value);

        return $options;
    }
76627
public function setOptions($options)
    {
        if ($this->options !== $options) {
            if (!$options instanceof AdapterOptions) {
                $options = new AdapterOptions($options);
            }

            if ($this->options) {
                $this->options->setAdapter(null);
            }
            $options->setAdapter($this);
            $this->options = $options;
        }

        return $this;
    }
897387
public function setOptions(array $options = array())
    {
        if (array_key_exists('messages', $options)) {
            $this->setMessages($options['messages']);
        }

        if (array_key_exists('hostname', $options)) {
            if (array_key_exists('allow', $options)) {
                $this->setHostnameValidator($options['hostname'], $options['allow']);
            } else {
                $this->setHostnameValidator($options['hostname']);
            }
        } elseif ($this->_options['hostname'] == null) {
            $this->setHostnameValidator();
        }

        if (array_key_exists('mx', $options)) {
            $this->setValidateMx($options['mx']);
        }

        if (array_key_exists('deep', $options)) {
            $this->setDeepMxCheck($options['deep']);
        }

        if (array_key_exists('domain', $options)) {
            $this->setDomainCheck($options['domain']);
        }

        return $this;
    }
785762
public function setOptions($options = [])
    {
        $default = [
            'dsn'             => null,
            'username'        => null,
            'password'        => null,
            'driver_options'  => null,
            'table_prefix'    => null,
            'fetch_mode'      => \PDO::FETCH_OBJ,
            'session_key'     => 'CDatabase',
            'verbose'         => null,
            'debug_connect'   => false,
        ];
        $this->options = array_merge($default, $options);

        if ($this->options['table_prefix']) {
            $this->setTablePrefix($this->options['table_prefix']);
        }

        if ($this->options['dsn']) {
            $dsn = explode(':', $this->options['dsn']);
            $this->setSQLDialect($dsn[0]);
        }
    }
610912
public function setOptsByArray($options)
	{
		foreach (self::$_setableOptions as $optionKey) {
			if (isset($options[$optionKey])) {
				$this->$optionKey = $options[$optionKey];
			}
		}

		return $this;
	}
681563
public function setOptions(array $options)
    {
        if (isset($options['on_update'])) {
            $this->autoUpdate($options['on_update']);
        } elseif (isset($options['auto_update'])) {
            $this->autoUpdate();
        }

        return parent::setOptions($options);
    }
526324
public function setFormatOptions(array $options)
    {
        foreach ($options as $name => $handler) {
            $this->setFormatOption($name, $handler);
        }
        return $this;
    }
1315417
public function setOptions($options = []) {

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

		$this -> options = array_merge($this -> options, $options);
	}
1019923
public function setOptions(Collection $options)
    {
        /**
         * We want to be able to assign an empty
         * ArrayCollection to variant options.
         *
         * When the collection is not empty, each
         * option in the collection will be added
         * separately since it needs to update the
         * parent product attribute list
         */
        if ($options->isEmpty()) {
            $this->options = $options;
        } else {
            $this->options->clear();
        }

        /**
         * @var ValueInterface $option
         */
        foreach ($options as $option) {

            /**
             * We need to update the parent product attribute collection.
             */
            $this->addOption($option);
        }

        return $this;
    }
585793
public function setOptions(array $options)
    {
        if ($this->options && is_array($options)) {
            $options = ArrayUtils::merge($this->options, $options);
        }

        $this->options = $options;

        return $this;
    }
615051
public function withOptions(array $options = []): Element
    {
        $this->options = array_merge(
            $this->options,
            $options
        );

        return $this;
    }