protected EntityForm::init(FormStateInterface $form_state)
Initialize the form state and the entity before the first form build.
File
- core/lib/Drupal/Core/Entity/EntityForm.php, line 129
Class
- EntityForm
- Base class for entity forms.
Namespace
Drupal\Core\Entity
Code
1 2 3 4 5 6 7 8 9 10 11 | protected function init(FormStateInterface $form_state ) { // Flag that this form has been initialized. $form_state ->set( 'entity_form_initialized' , TRUE); // Prepare the entity to be presented in the entity form. $this ->prepareEntity(); // Invoke the prepare form hooks. $this ->prepareInvokeAll( 'entity_prepare_form' , $form_state ); $this ->prepareInvokeAll( $this ->entity->getEntityTypeId() . '_prepare_form' , $form_state ); } |
Please login to continue.