@param array $setting Setting

@throws \Darvin\ContentBundle\Widget\WidgetException
423185
private function validateWidgetSetting(array $setting)
    {
        foreach ($this->requiredParams as $param) {
            if (!isset($setting[$param])) {
                new WidgetException(sprintf('"%s" param must be set for "ForwardToController" widget', $param));
            }
        }
    }
467911
public function edit_setting( $setting, $key, $value ) {
		if ( ! $this->is_setting( $setting ) ) {
			return true;
		}
		$priority                                         = $this->_setting_priority[ $setting ];
		$this->_settings[ $priority ][ $setting ][ $key ] = $value;

		return true;
	}
651652
protected function set_settings() {

		// If settings is not an array, temporarily convert it to an array.
		// This is just to allow us to process everything the same way and avoid code duplication.
		// if settings is not an array then it will not be set as an array in the end.
		if ( ! is_array( $this->settings ) ) {
			$this->settings = [
				'kirki_placeholder_setting' => $this->settings,
			];
		}
		$settings = [];
		foreach ( $this->settings as $setting_key => $setting_value ) {
			$settings[ $setting_key ] = $setting_value;

			// If we're using serialized options then we need to spice this up.
			if ( 'option' === $this->option_type && '' !== $this->option_name && ( false === strpos( $setting_key, '[' ) ) ) {
				$settings[ $setting_key ] = "{$this->option_name}[{$setting_value}]";
			}
		}
		$this->settings = $settings;
		if ( isset( $this->settings['kirki_placeholder_setting'] ) ) {
			$this->settings = $this->settings['kirki_placeholder_setting'];
		}
	}
1007903
private function setSettings($settings)
    {
        if ($settings) {
            foreach ($this->settings as $key => &$value) {
                if (!empty($settings->{$key}) && $settings->{$key}) {
                    if (is_object($settings->{$key})) {
                        $value = array_merge(
                            $value,
                            json_decode(json_encode($settings->{$key}, JSON_FORCE_OBJECT), true)
                        );
                    } else {
                        $value = $settings->{$key};
                    }
                }
            }
        }
    }
50118
@Override
    public void setSetting(String setting) throws CDKException {
        if (settings.contains(setting)) {
            this.setting = setting;
        } else {
            throw new CDKException("Setting " + setting + " is not allowed.");
        }
    }
1356728
public function getConfigSetting($setting) {
		$source = $this->getConfigData();
		foreach(func_get_args() as $setting) {
			if(empty($source[$setting])) return null;
			$source = $source[$setting];
		}
		return $source;
	}
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__
                    );
                }
            }
        }
    }
1038059
public function setLabelsSettings(array $Settings = [])
    {
        if (isset($Settings["Type"])) {
            $this->Labels["Type"] = $Settings["Type"];
        }
        if (isset($Settings["R"])) {
            $this->Labels["R"] = $Settings["R"];
        }
        if (isset($Settings["G"])) {
            $this->Labels["G"] = $Settings["G"];
        }
        if (isset($Settings["B"])) {
            $this->Labels["B"] = $Settings["B"];
        }
        if (isset($Settings["Alpha"])) {
            $this->Labels["Alpha"] = $Settings["Alpha"];
        }
    }
1107238
protected function addModelSettings(array &$settings)
    {
        $empty = $this->util->getTranslated()->getEmptyDropdownArray();

        $settings['elementClass'] = 'Select';
        $settings['multiOptions'] = $empty + $this->getLookup();
    }
852385
public function injectSettings(array $settings)
    {
        $this->settings = $settings;
        if (isset($this->settings['debugMode'])) {
            $this->setDebugMode($this->settings['debugMode'] === true);
        }
        if (isset($this->settings['enableContentCache'])) {
            $this->setEnableContentCache($this->settings['enableContentCache'] === true);
        }
    }
930433
public function addSetting(Setting $setting)
    {
        $name = $setting->getName();

        if (isset($this->settings[$name])) {
            throw new \Exception(sprintf('A setting with name "%s" does already exist for plugin "%s"', $name, $this->pluginName));
        }

        $this->settings[$name] = $setting;
    }
283040
public function initBySetting($model, $setting)
    {
        parent::initBySetting($model, $setting);
        if (is_array($setting)) {
            if (!isset($setting['table'])) {
                throw new \Stack\Exception\MissingSetting('"table" missing for the ManyToMany relation.');
            }
            if (!isset($setting['remote_attribute_name'])) {
                throw new \Stack\Exception\MissingSetting('"remote_attribute_name" missing for the ManyToMany relation.');
            }
            $this->table = $setting['table'];
            $this->remoteAttributeName = $setting['remote_attribute_name'];
        }
    }
935974
public function addSettings( $settings )
    {
        $this->settings = ArrayUtils::merge(
            $this->settings,
            ArrayUtils::iteratorToArray( $settings )
        );

        return $this;
    }
1070478
public function setSettings( $settings )
    {
        if ( ! empty( $settings ) )
        {
            foreach ( $settings as $name => $value )
            {
                $this->setSetting( $name, $value );
            }
        }

        return $this;
    }
780036
public function initBySetting($model, $setting)
    {
        parent::initBySetting($model, $setting);
        if (is_array($setting)) {
            if (isset($setting['remote_class_type'])) {
                $this->remoteModelType = $setting['remote_class_type'];
            }
        }
    }
671911
final public static function get_instance( array $setting = [] ) {
		$class_name = get_called_class();
		if ( ! isset( self::$instances[ $class_name ] ) ) {
			self::$instances[ $class_name ] = new $class_name( $setting );
		}

		return self::$instances[ $class_name ];
	}
718812
function appendMIMETypeSetting( $settings )
    {
        $this->MIMETypeSettings[] = $settings;
        if ( !isset( $this->MIMETypeSettingsMap[$settings['mime_type']] ) )
            $this->MIMETypeSettingsMap[$settings['mime_type']] = array();
        $this->MIMETypeSettingsMap[$settings['mime_type']][] = $settings;
    }