ContentEntityFormInterface::setFormDisplay

public ContentEntityFormInterface::setFormDisplay(EntityFormDisplayInterface $form_display, FormStateInterface $form_state) Sets the form display. Sets the form display which will be used for populating form element defaults. Parameters \Drupal\Core\Entity\Display\EntityFormDisplayInterface $form_display: The form display that the current form operates with. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value $this File core/lib/Drupal/Core/Entity/Con

ContentEntityFormInterface::isDefaultFormLangcode

public ContentEntityFormInterface::isDefaultFormLangcode(FormStateInterface $form_state) Checks whether the current form language matches the entity one. Parameters \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value bool Returns TRUE if the entity form language matches the entity one. File core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php, line 59 Class ContentEntityFormInterface Defines a common interface for content entity form classe

ContentEntityFormInterface::getFormLangcode

public ContentEntityFormInterface::getFormLangcode(FormStateInterface $form_state) Gets the code identifying the active form language. Parameters \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value string The form language code. File core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php, line 48 Class ContentEntityFormInterface Defines a common interface for content entity form classes. Namespace Drupal\Core\Entity Code public function g

ContentEntityFormInterface::getFormDisplay

public ContentEntityFormInterface::getFormDisplay(FormStateInterface $form_state) Gets the form display. Parameters \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value \Drupal\Core\Entity\Display\EntityFormDisplayInterface. The current form display. File core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php, line 22 Class ContentEntityFormInterface Defines a common interface for content entity form classes. Namespace Drupal\Core\Entity C

ContentEntityFormInterface

Defines a common interface for content entity form classes. Hierarchy interface \Drupal\Core\Form\FormInterfaceinterface \Drupal\Core\Form\BaseFormIdInterfaceinterface \Drupal\Core\Entity\EntityFormInterfaceinterface \Drupal\Core\Entity\ContentEntityFormInterface File core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php, line 11 Namespace Drupal\Core\Entity Members Name Modifiers Type Description BaseFormIdInterface::getBaseFormId public function Returns a strin

ContentEntityForm::__construct

public ContentEntityForm::__construct(EntityManagerInterface $entity_manager) Constructs a ContentEntityForm object. Parameters \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager. File core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 30 Class ContentEntityForm Entity form variant for content entity types. Namespace Drupal\Core\Entity Code public function __construct(EntityManagerInterface $entity_manager) { $this->entityManager = $entity_manager

ContentEntityForm::validateForm

public ContentEntityForm::validateForm(array &$form, FormStateInterface $form_state) Button-level validation handlers are highly discouraged for entity forms, as they will prevent entity validation from running. If the entity is going to be saved during the form submission, this method should be manually invoked from the button-level validation handler, otherwise an exception will be thrown. Overrides FormBase::validateForm File core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 91

ContentEntityForm::updateFormLangcode

public ContentEntityForm::updateFormLangcode($entity_type_id, EntityInterface $entity, array $form, FormStateInterface $form_state) Updates the form language to reflect any change to the entity language. There are use cases for modules to act both before and after form language being updated, thus the update is performed through an entity builder callback, which allows to support both cases. Parameters string $entity_type_id: The entity type identifier. \Drupal\Core\Entity\EntityInterface $ent

ContentEntityForm::updateChangedTime

public ContentEntityForm::updateChangedTime(EntityInterface $entity) Updates the changed time of the entity. Applies only if the entity implements the EntityChangedInterface. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity updated with the submitted values. File core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 284 Class ContentEntityForm Entity form variant for content entity types. Namespace Drupal\Core\Entity Code public function updateChangedTime(EntityInt

ContentEntityForm::submitForm

public ContentEntityForm::submitForm(array &$form, FormStateInterface $form_state) This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state can be updated, this way the subsequently invoked handlers can retrieve a regular entity object to act on. Generally this method should not be overridden unless