function FieldBlock::formatterSettingsAjaxCallback

Same name in other branches
  1. 9 core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::formatterSettingsAjaxCallback()
  2. 8.9.x core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::formatterSettingsAjaxCallback()
  3. 11.x core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::formatterSettingsAjaxCallback()

Render API callback: gets the layout settings elements.

File

core/modules/layout_builder/src/Plugin/Block/FieldBlock.php, line 332

Class

FieldBlock
Provides a block that renders a field from an entity.

Namespace

Drupal\layout_builder\Plugin\Block

Code

public static function formatterSettingsAjaxCallback(array $form, FormStateInterface $form_state) {
    $formatter_array_parents = $form_state->get('field_block_array_parents');
    return NestedArray::getValue($form, array_merge($formatter_array_parents, [
        'settings_wrapper',
    ]));
}

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