function FieldConfigBase::getSetting
Returns the value of a given setting.
Parameters
string $setting_name: The setting name.
Return value
mixed The setting value or NULL if the setting name doesn't exist.
Overrides DataDefinitionInterface::getSetting
File
- 
              core/lib/ Drupal/ Core/ Field/ FieldConfigBase.php, line 387 
Class
- FieldConfigBase
- Base class for configurable field definitions.
Namespace
Drupal\Core\FieldCode
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);
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
