Hook action<FormName>FormBuilderModifier

Informations

Hook action<FormName>FormBuilderModifier
Locations
FO
BO
Type action
Origin core
Aliases
Description This hook allows to modify an identifiable object forms content by modifying form builder data or FormBuilder itself.
Replace FormBuilderName by the identitiable object type.

Located in

Origin File
core src/Core/Form/IdentifiableObject/Builder/FormBuilder.php

Call of the Hook in the origin file

$this->hookDispatcher->dispatchWithParameters('action' . $this->camelize($formBuilder->getName()) . 'FormBuilderModifier', [
    'form_builder' => $formBuilder,
    'data' => &$data,
    'options' => &$options,
    'id' => $id
]);

Example implementation

This hook has been implemented as an example in our modules examples repository - demoextendsymfonyform1.

This hook has been implemented as an example in our modules examples repository - demoextendsymfonyform2.

This hook has been implemented as an example in our modules examples repository - demoextendsymfonyform3.

This hook has been implemented as an example in our modules examples repository - demoproductform.

This hook has been described in the context of Product Page in Back Office in Extending the new product page form page