ContentEntityForm::setFormDisplay

public ContentEntityForm::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 Overrides ContentEntityFormInterface::setForm

ContentEntityForm::isDefaultFormLangcode

public ContentEntityForm::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. Overrides ContentEntityFormInterface::isDefaultFormLangcode File core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 213 Class ContentEntityForm Entity form variant for

ContentEntityForm::initFormLangcodes

protected ContentEntityForm::initFormLangcodes(FormStateInterface $form_state) Initializes form language code values. Parameters \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. File core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 185 Class ContentEntityForm Entity form variant for content entity types. Namespace Drupal\Core\Entity Code protected function initFormLangcodes(FormStateInterface $form_state) { // Store the entity default language

ContentEntityForm::init

protected ContentEntityForm::init(FormStateInterface $form_state) Initializes the form state and the entity before the first form build. Parameters \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Overrides EntityForm::init File core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 166 Class ContentEntityForm Entity form variant for content entity types. Namespace Drupal\Core\Entity Code protected function init(FormStateInterface $form_state) { // E

ContentEntityForm::getFormLangcode

public ContentEntityForm::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. Overrides ContentEntityFormInterface::getFormLangcode File core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 205 Class ContentEntityForm Entity form variant for content entity types. Namespace Drupal\Core\Entity Code pub

ContentEntityForm::getFormDisplay

public ContentEntityForm::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. Overrides ContentEntityFormInterface::getFormDisplay File core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 238 Class ContentEntityForm Entity form variant for content entity types. Namespace Drupal\C

ContentEntityForm::getEditedFieldNames

protected ContentEntityForm::getEditedFieldNames(FormStateInterface $form_state) Gets the names of all fields edited in the form. If the entity form customly adds some fields to the form (i.e. without using the form display), it needs to add its fields here and override flagViolations() for displaying the violations. Parameters \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value string[] An array of field names. File core/lib/Drupal/Core/Entity/Conten

ContentEntityForm::form

public ContentEntityForm::form(array $form, FormStateInterface $form_state) Gets the actual form array to be built. Overrides EntityForm::form See also \Drupal\Core\Entity\EntityForm::processForm() \Drupal\Core\Entity\EntityForm::afterBuild() File core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 46 Class ContentEntityForm Entity form variant for content entity types. Namespace Drupal\Core\Entity Code public function form(array $form, FormStateInterface $form_state) { $form =

ContentEntityForm::flagViolations

protected ContentEntityForm::flagViolations(EntityConstraintViolationListInterface $violations, array $form, FormStateInterface $form_state) Flags violations for the current form. If the entity form customly adds some fields to the form (i.e. without using the form display), it needs to add its fields to array returned by getEditedFieldNames() and overwrite this method in order to show any violations for those fields; e.g.: foreach ($violations->getByField('name') as $violation) { $form_st

ContentEntityForm::create

public static ContentEntityForm::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The servic