You are here

public function FieldConfigBase::getSetting in Zircon Profile 8

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

Returns the value of a given setting.

Parameters

string $setting_name: The setting name.

Return value

mixed The setting value.

Overrides DataDefinitionInterface::getSetting

File

core/lib/Drupal/Core/Field/FieldConfigBase.php, line 355
Contains \Drupal\Core\Field\FieldConfigBase.

Class

FieldConfigBase
Base class for configurable field definitions.

Namespace

Drupal\Core\Field

Code

public function getSetting($setting_name) {
  if (array_key_exists($setting_name, $this->settings)) {
    return $this->settings[$setting_name];
  }
  else {
    return $this
      ->getFieldStorageDefinition()
      ->getSetting($setting_name);
  }
}