You are here

protected function WorkspaceForm::getEditedFieldNames in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/Form/WorkspaceForm.php \Drupal\workspaces\Form\WorkspaceForm::getEditedFieldNames()
  2. 9 core/modules/workspaces/src/Form/WorkspaceForm.php \Drupal\workspaces\Form\WorkspaceForm::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.

Overrides ContentEntityForm::getEditedFieldNames

File

core/modules/workspaces/src/Form/WorkspaceForm.php, line 98

Class

WorkspaceForm
Form controller for the workspace edit forms.

Namespace

Drupal\workspaces\Form

Code

protected function getEditedFieldNames(FormStateInterface $form_state) {
  return array_merge([
    'label',
    'id',
  ], parent::getEditedFieldNames($form_state));
}