function ContentEntityForm::getEditedFieldNames
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/ContentEntityForm.php \Drupal\Core\Entity\ContentEntityForm::getEditedFieldNames()
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.
1 method overrides ContentEntityForm::getEditedFieldNames()
- CommentForm::getEditedFieldNames in core/
modules/ comment/ src/ CommentForm.php - Gets the names of all fields edited in the form.
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityForm.php, line 236
Class
- ContentEntityForm
- Entity form variant for content entity types.
Namespace
Drupal\Core\EntityCode
protected function getEditedFieldNames(FormStateInterface $form_state) {
return array_keys($this->getFormDisplay($form_state)
->getComponents());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.