Add the model settings like the elementClass for this field.

elementClass is overwritten when this field is read only, unless you override it again in getDataModelSettings()

@param array $settings The settings set so far
352810
protected function addModelSettings(array &$settings)
    {
        $empty = $this->util->getTranslated()->getEmptyDropdownArray();

        $settings['elementClass'] = 'Select';
        $settings['multiOptions'] = $empty + $this->util->getDbLookup()->getUserConsents();
    }
94212
public function load(array $settings = null)
    {
        $classVars = array_keys(get_class_vars(get_class($this)));

        foreach ($settings as $name => $value) {
            if (in_array($name, $this->blacklistConfig, true)) {
                continue;
            }

            if (in_array($name, $classVars, true)) {
                $method = 'set' . SimpleDataObjectConverter::snakeCaseToUpperCamelCase($name);
                if (method_exists($this, $method)) {
                    $this->configMapping += $this->configHelper->getNewSettingPath($name);
                    $this->{$method}($this->castToType($value, $name));
                } else {
                    $this->logger->debug(
                        'The evaluated method "' . $method . '" is not available in class ' . __CLASS__
                    );
                }
            } else {
                if (array_key_exists($name, $this->additionalSettings)) {
                    $this->additionalSettings[$name] = $value;
                } else {
                    $this->logger->debug(
                        'The given setting property "' . $name . '" is not available in class ' . __CLASS__
                    );
                }
            }
        }
    }
603907
protected function setSettings(array $settings): void
    {
        $this->server->set(array_merge($this->defaultSettings, $this->settings, $settings));
    }
357292
public static function init($settings = null)
    {
        if (is_array($settings)) {
            //merging settings (and setting the global settings)
            //settings should be submitted via an array
            $settings = self::settings($settings);
        } else {
            $settings = self::settings();
        }

        if ($settings['enabled']) {
            $ssversion = self::subpackage_settings('ssversion');

            //Enabling calendars
            if (self::subpackage_enabled('calendars')) {
                if ($ssversion == '3.0') {
                    Object::add_extension('Event', 'EventCalendarExtension');
                } else {
                    Event::add_extension('EventCalendarExtension');
                }
                $s = self::subpackage_settings('calendars');
                if ($s['colors']) {
                    if ($ssversion == '3.0') {
                        Object::add_extension('Calendar', 'CalendarColorExtension');
                    } else {
                        Calendar::add_extension('CalendarColorExtension');
                    }
                }
                if ($s['shading']) {
                    if ($ssversion == '3.0') {
                        Object::add_extension('Calendar', 'ShadedCalendarExtension');
                    } else {
                        Calendar::add_extension('ShadedCalendarExtension');
                    }
                }
            }
            //Enabling categories
            if (self::subpackage_enabled('categories')) {
                if ($ssversion == '3.0') {
                    Object::add_extension('Event', 'EventCategoryExtension');
                } else {
                    Event::add_extension('EventCategoryExtension');
                }
            }
            //Enabling Event Page
            if (self::subpackage_setting('pagetypes', 'enable_eventpage')) {
                if ($ssversion == '3.0') {
                    Object::add_extension('Event', 'EventHasEventPageExtension');
                } else {
                    Event::add_extension('EventHasEventPageExtension');
                }
            }
            //Enabling debug mode
            if (self::subpackage_enabled('debug')) {
                if ($ssversion == '3.0') {
                    Object::add_extension('Event', 'EventDebugExtension');
                } else {
                    Event::add_extension('EventDebugExtension');
                }
            }
            //Enabling registrations
            if (self::subpackage_enabled('registrations')) {
                if ($ssversion == '3.0') {
                    Object::add_extension('Event', 'EventRegistrationExtension');
                } else {
                    Event::add_extension('EventRegistrationExtension');
                }
            }

            //Adding URL Segment extension to Calendar (currently done for all but could be made configurable later)
            Object::add_extension('Calendar', 'DoURLSegmentExtension');
            if ($ssversion == '3.0') {
                Object::add_extension('Calendar', 'DoURLSegmentExtension');
            } else {
                Calendar::add_extension('DoURLSegmentExtension');
            }
        }
    }
116671
public function setSettings(array $settings) {
        $this->settings = $settings;

        $hosts = \ECL\Util::get($settings, 'hosts', []);
        $index_hosts = \ECL\Util::get($settings, 'index_hosts', []);
        $ssl_cert = \ECL\Util::get($settings, 'ssl_cert', null);
        $ssl_client_key = \ECL\Util::get($settings, 'ssl_client_key', null);
        $ssl_client_cert = \ECL\Util::get($settings, 'ssl_client_cert', null);

        if(count($index_hosts) == 0) {
            $index_hosts = $hosts;
        }

        $cb = \Elasticsearch\ClientBuilder::create();
        if(count($hosts)) {
            $cb->setHosts($hosts);
        }

        $icb = \Elasticsearch\ClientBuilder::create();
        if(count($index_hosts)) {
            $icb->setHosts($index_hosts);
        }

        if($ssl_cert !== null) {
            $cb->setSSLVerification($ssl_cert);
            $icb->setSSLVerification($ssl_cert);
        }
        if($ssl_client_key !== null && $ssl_client_cert !== null) {
            $cb->setSSLKey($ssl_client_key);
            $cb->setSSLCert($ssl_client_cert);
            $icb->setSSLKey($ssl_client_key);
            $icb->setSSLCert($ssl_client_cert);
        }

        $this->client = $cb->build();
        $this->index_client = $icb->build();
    }
891717
public function addAll(array $elements)
    {
        if (is_array($elements)) {
            foreach ($elements as $element) {
                $this->_items[] = $element;
            }
            $this->_iterator = null;
        } else {
            throw new CollectionException('Given array can not added to collection, because it is no array.', E_NOTICE);
        }
    }
409573
public function setup(Model $model, $settings = array()) {
        $this->settings[$model->alias] = Hash::merge($this->_defaults, $settings);
    }
941158
protected function parseCompatibleSettings(array $settings)
    {
        $settings = collect($settings)->collapse()->all();

        foreach ($settings as $setting) {
            if ($setting instanceof CanHandlePageSettings) {
                $setting->settingGet();
            }
        }
    }
583535
protected function loadScript($settings)
    {
        if ($this->scripts !== null) {
            $this->scripts->add($settings);
        }

        return $this;
    }
233228
public static function overload(array $settings)
    {
        if (!self::loaded()) return false;
        foreach ($settings as $var=>$val) {
            self::set($var, $val);
        }
    }
935974
public function addSettings( $settings )
    {
        $this->settings = ArrayUtils::merge(
            $this->settings,
            ArrayUtils::iteratorToArray( $settings )
        );

        return $this;
    }
299950
public static function setSettings( array $values )
	{
		foreach ($values as $name => $value)
			self::setSetting($name, $value);
	}
1036025
public function initBySetting($model, $setting)
    {
        parent::initBySetting($model, $setting);
        $this->model = $model;
        if (is_array($setting)) {
            if (!isset($setting['remote_class_type'])) {
                throw new \Stack\Exception\MissingSetting('"remote_class_type" missing for the OneToMany relation.');
            }
            if (!isset($setting['related_attribute_name'])) {
                throw new \Stack\Exception\MissingSetting('"related_attribute_name" missing for the OneToMany relation.');
            }
            if (isset($setting['filter_list'])) {
                $this->filterList = $setting['filter_list'];
            }
            if (isset($setting['unique_remote'])) {
                $this->uniqueRemote = !!$setting['unique_remote'];
            }
            $this->remoteModelType = $setting['remote_class_type'];
            $this->relatedAttributeName = $setting['related_attribute_name'];
        }
    }
576666
public function addSettings($section, array $settings = []): PageInterface
    {
        $currentSettings = $this->repository()->getSettings()->all();

        if (is_array($section)) {
            $settings = array_merge($currentSettings, $section);
        } else {
            $settings = array_merge($currentSettings, [$section => $settings]);
        }

        $this->repository()->setSettings($settings);

        // Set a default page view for handling
        // the settings. A user can still overwrite
        // the view.
        if ('page' === $this->ui()->getViewPath()) {
            $this->ui()->setView('options');
        }

        return $this;
    }
460852
public function addSetters(array $setters)
    {
        foreach ($setters as $property => $setter) {
            if (is_int($property)) {
                $property = $setter;
                $setter   = 'set' . ucfirst($setter);
            }
            $this->setters[$setter] = $property;
        }
    }
1307913
protected function loadStylesheet($settings)
    {
        if ($this->styles !== null) {
            $this->styles->add($settings);
        }

        return $this;
    }
294658
public function injectSettings(array $settings)
    {
        if (isset($settings['security']['authentication']['authenticationStrategy'])) {
            $authenticationStrategyName = $settings['security']['authentication']['authenticationStrategy'];
            switch ($authenticationStrategyName) {
                case 'allTokens':
                    $this->authenticationStrategy = self::AUTHENTICATE_ALL_TOKENS;
                    break;
                case 'oneToken':
                    $this->authenticationStrategy = self::AUTHENTICATE_ONE_TOKEN;
                    break;
                case 'atLeastOneToken':
                    $this->authenticationStrategy = self::AUTHENTICATE_AT_LEAST_ONE_TOKEN;
                    break;
                case 'anyToken':
                    $this->authenticationStrategy = self::AUTHENTICATE_ANY_TOKEN;
                    break;
                default:
                    throw new Exception('Invalid setting "' . $authenticationStrategyName . '" for security.authentication.authenticationStrategy', 1291043022);
            }
        }

        if (isset($settings['security']['csrf']['csrfStrategy'])) {
            $csrfStrategyName = $settings['security']['csrf']['csrfStrategy'];
            switch ($csrfStrategyName) {
                case 'onePerRequest':
                    $this->csrfProtectionStrategy = self::CSRF_ONE_PER_REQUEST;
                    break;
                case 'onePerSession':
                    $this->csrfProtectionStrategy = self::CSRF_ONE_PER_SESSION;
                    break;
                case 'onePerUri':
                    $this->csrfProtectionStrategy = self::CSRF_ONE_PER_URI;
                    break;
                default:
                    throw new Exception('Invalid setting "' . $csrfStrategyName . '" for security.csrf.csrfStrategy', 1291043024);
            }
        }
    }