You are here

public function PluginSettingsBase::setSetting in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Field/PluginSettingsBase.php \Drupal\Core\Field\PluginSettingsBase::setSetting()

Sets the value of a setting for the plugin.

Parameters

string $key: The setting name.

mixed $value: The setting value.

Return value

$this

Overrides PluginSettingsInterface::setSetting

1 call to PluginSettingsBase::setSetting()
TestFieldWidget::onDependencyRemoval in core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidget.php
Informs the plugin that some configuration it depends on will be deleted.

File

core/lib/Drupal/Core/Field/PluginSettingsBase.php, line 92
Contains \Drupal\Core\Field\PluginSettingsBase.

Class

PluginSettingsBase
Base class for the Field API plugins.

Namespace

Drupal\Core\Field

Code

public function setSetting($key, $value) {
  $this->settings[$key] = $value;
  return $this;
}