public ContentEntityForm::form(array $form, FormStateInterface $form_state)
Gets the actual form array to be built.
Overrides EntityForm::form
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
public function form(array $form, FormStateInterface $form_state) { $form = parent::form($form, $form_state); // Content entity forms do not use the parent's #after_build callback // because they only need to rebuild the entity in the validation and the // submit handler because Field API uses its own #after_build callback for // its widgets. unset($form['#after_build']); $this->getFormDisplay($form_state)->buildForm($this->entity, $form, $form_state); // Allow modules to act before and after form language is updated. $form['#entity_builders']['update_form_langcode'] = [$this, 'updateFormLangcode']; return $form; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!ContentEntityForm.php/function/ContentEntityForm::form/8.1.x