protected function ContentEntityForm::getEditedFieldNames in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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.
3 calls to ContentEntityForm::getEditedFieldNames()
- AccountForm::getEditedFieldNames in core/
modules/ user/ src/ AccountForm.php - Gets the names of all fields edited in the form.
- CommentForm::getEditedFieldNames in core/
modules/ comment/ src/ CommentForm.php - Gets the names of all fields edited in the form.
- ContentEntityForm::validateForm in core/
lib/ Drupal/ Core/ Entity/ ContentEntityForm.php - 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…
2 methods override ContentEntityForm::getEditedFieldNames()
- AccountForm::getEditedFieldNames in core/
modules/ user/ src/ AccountForm.php - Gets the names of all fields edited in the form.
- 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 130 - Contains \Drupal\Core\Entity\ContentEntityForm.
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());
}