protected function FormManglerService::populateExtraBehaviorSections in Rabbit Hole 8
Same name and namespace in other branches
- 2.x src/FormManglerService.php \Drupal\rabbit_hole\FormManglerService::populateExtraBehaviorSections()
Add additional fields to the form based on behaviors.
Parameters
array $form: The form array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
string $form_id: The form ID.
\Drupal\Core\Entity\EntityInterface|null $entity: The entity whose settings form we are displaying.
bool $entity_is_bundle: Whether the entity is a bundle.
\Drupal\Core\Config\ImmutableConfig|null $bundle_settings: The settings for this bundle.
1 call to FormManglerService::populateExtraBehaviorSections()
- FormManglerService::addRabbitHoleOptionsToForm in src/
FormManglerService.php - Common functionality for adding rabbit hole options to forms.
File
- src/
FormManglerService.php, line 462
Class
- FormManglerService
- Provides necessary form alterations.
Namespace
Drupal\rabbit_holeCode
protected function populateExtraBehaviorSections(array &$form, FormStateInterface $form_state, $form_id, EntityInterface $entity = NULL, $entity_is_bundle = FALSE, ImmutableConfig $bundle_settings = NULL) {
foreach ($this->rhBehaviorPluginManager
->getDefinitions() as $id => $def) {
$this->rhBehaviorPluginManager
->createInstance($id)
->settingsForm($form['rabbit_hole'], $form_state, $form_id, $entity, $entity_is_bundle, $bundle_settings);
}
}