You are here

public function ShortcutForm::form in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/shortcut/src/ShortcutForm.php \Drupal\shortcut\ShortcutForm::form()
  2. 10 core/modules/shortcut/src/ShortcutForm.php \Drupal\shortcut\ShortcutForm::form()

Gets the actual form array to be built.

Overrides ContentEntityForm::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

File

core/modules/shortcut/src/ShortcutForm.php, line 26

Class

ShortcutForm
Form handler for the shortcut entity forms.

Namespace

Drupal\shortcut

Code

public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);
  $form['#attached']['library'][] = 'core/drupal.form';
  return $form;
}