function FieldBlock::thirdPartySettingsForm
Same name in other branches
- 9 core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::thirdPartySettingsForm()
- 10 core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::thirdPartySettingsForm()
- 11.x core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::thirdPartySettingsForm()
Adds the formatter third party settings forms.
Parameters
\Drupal\Core\Field\FormatterInterface $plugin: The formatter.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.
array $form: The (entire) configuration form array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
Return value
array The formatter third party settings form.
1 call to FieldBlock::thirdPartySettingsForm()
- FieldBlock::formatterSettingsProcessCallback in core/
modules/ layout_builder/ src/ Plugin/ Block/ FieldBlock.php - Render API callback: builds the formatter settings elements.
File
-
core/
modules/ layout_builder/ src/ Plugin/ Block/ FieldBlock.php, line 310
Class
- FieldBlock
- Provides a block that renders a field from an entity.
Namespace
Drupal\layout_builder\Plugin\BlockCode
protected function thirdPartySettingsForm(FormatterInterface $plugin, FieldDefinitionInterface $field_definition, array $form, FormStateInterface $form_state) {
$settings_form = [];
// Invoke hook_field_formatter_third_party_settings_form(), keying resulting
// subforms by module name.
foreach ($this->moduleHandler
->getImplementations('field_formatter_third_party_settings_form') as $module) {
$settings_form[$module] = $this->moduleHandler
->invoke($module, 'field_formatter_third_party_settings_form', [
$plugin,
$field_definition,
EntityDisplayBase::CUSTOM_MODE,
$form,
$form_state,
]);
}
return $settings_form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.