You are here

protected function BricksTreeDynamicInlineWidget::getFieldSetting in Bricks​ 8

Same name and namespace in other branches
  1. 2.x modules/bricks_dynamic/src/Plugin/Field/FieldWidget/BricksTreeDynamicInlineWidget.php \Drupal\bricks_dynamic\Plugin\Field\FieldWidget\BricksTreeDynamicInlineWidget::getFieldSetting()

Returns the value of a field setting.

Parameters

string $setting_name: The setting name.

Return value

mixed The setting value.

Overrides WidgetBase::getFieldSetting

File

modules/bricks_dynamic/src/Plugin/Field/FieldWidget/BricksTreeDynamicInlineWidget.php, line 115

Class

BricksTreeDynamicInlineWidget
Plugin annotation @FieldWidget( id = "bricks_tree_dynamic_inline", label = @Translation("Bricks tree Dynamic (Inline entity form)"), description = @Translation("A tree of inline entity forms."), field_types = { "bricks_dynamic" }, …

Namespace

Drupal\bricks_dynamic\Plugin\Field\FieldWidget

Code

protected function getFieldSetting($setting_name) {
  if ($setting_name == 'target_type') {
    return $this
      ->getEntityType();
  }
  return $this->fieldDefinition
    ->getSetting($setting_name);
}