function WidgetBase::getFieldSetting

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

Returns the value of a field setting.

Parameters

string $setting_name: The setting name.

Return value

mixed The setting value.

23 calls to WidgetBase::getFieldSetting()
DateRangeDatelistWidget::formElement in core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeDatelistWidget.php
Returns the form for a single field widget.
DateRangeDatelistWidget::settingsForm in core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeDatelistWidget.php
Returns a form to configure settings for the widget.
DateRangeDatelistWidget::settingsSummary in core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeDatelistWidget.php
Returns a short summary for the current widget settings.
DateRangeDefaultWidget::formElement in core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeDefaultWidget.php
Returns the form for a single field widget.
DateRangeWidgetBase::massageFormValues in core/modules/datetime_range/src/Plugin/Field/FieldWidget/DateRangeWidgetBase.php
Massages the form values into the format expected for field values.

... See full list

File

core/lib/Drupal/Core/Field/WidgetBase.php, line 560

Class

WidgetBase
Base class for 'Field widget' 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.