function FormatterBase::getFieldSetting

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/FormatterBase.php \Drupal\Core\Field\FormatterBase::getFieldSetting()
  2. 10 core/lib/Drupal/Core/Field/FormatterBase.php \Drupal\Core\Field\FormatterBase::getFieldSetting()
  3. 11.x core/lib/Drupal/Core/Field/FormatterBase.php \Drupal\Core\Field\FormatterBase::getFieldSetting()

Returns the value of a field setting.

Parameters

string $setting_name: The setting name.

Return value

mixed The setting value.

10 calls to FormatterBase::getFieldSetting()
BooleanFormatter::getOutputFormats in core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/BooleanFormatter.php
Gets the available format options.
CommentDefaultFormatter::calculateDependencies in core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
Calculates dependencies for the configured plugin.
CommentDefaultFormatter::getViewModes in core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
Provides a list of comment view modes for the configured comment type.
CommentDefaultFormatter::viewElements in core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
Builds a renderable array for a field value.
DateTimeFormatterBase::setTimeZone in core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeFormatterBase.php
Sets the proper time zone on a DrupalDateTime object for the current user.

... See full list

File

core/lib/Drupal/Core/Field/FormatterBase.php, line 159

Class

FormatterBase
Base class for 'Field formatter' plugin implementations.

Namespace

Drupal\Core\Field

Code

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

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