function DataDefinition::getSetting

Same name in other branches
  1. 9 core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::getSetting()
  2. 8.9.x core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::getSetting()
  3. 10 core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::getSetting()

Overrides DataDefinitionInterface::getSetting

2 methods override DataDefinition::getSetting()
BaseFieldDefinition::getSetting in core/lib/Drupal/Core/Field/BaseFieldDefinition.php
Returns the value of a given setting.
FieldDefinition::getSetting in core/lib/Drupal/Core/Field/FieldDefinition.php
Returns the value of a given setting.

File

core/lib/Drupal/Core/TypedData/DataDefinition.php, line 238

Class

DataDefinition
A typed data definition class for defining data based on defined data types.

Namespace

Drupal\Core\TypedData

Code

public function getSetting($setting_name) {
    return $this->definition['settings'][$setting_name] ?? NULL;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.