function FieldItemBase::getSetting

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

Returns the value of a field setting.

Parameters

string $setting_name: The setting name.

Return value

mixed The setting value.

15 calls to FieldItemBase::getSetting()
BooleanItem::fieldSettingsForm in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php
BooleanItem::getPossibleOptions in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php
CommentItem::storageSettingsForm in core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php
DateTimeItem::storageSettingsForm in core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php
DecimalItem::preSave in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php

... See full list

File

core/lib/Drupal/Core/Field/FieldItemBase.php, line 111

Class

FieldItemBase
An entity field item.

Namespace

Drupal\Core\Field

Code

protected function getSetting($setting_name) {
    return $this->getFieldDefinition()
        ->getSetting($setting_name);
}

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