function FormHooks::formNodeFormAlter

Same name and namespace in other branches
  1. main core/themes/admin/src/Hook/FormHooks.php \Drupal\admin\Hook\FormHooks::formNodeFormAlter()

Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\Form\NodeForm.

Changes vertical tabs to container.

Attributes

#[Hook('form_node_form_alter')]

File

core/themes/admin/src/Hook/FormHooks.php, line 313

Class

FormHooks
Provides form related hook implementations.

Namespace

Drupal\admin\Hook

Code

public function formNodeFormAlter(array &$form) : void {
  $form['#theme'] = [
    'node_edit_form',
  ];
  $form['#attached']['library'][] = 'admin/form-two-columns';
  $this->ensureAdvancedSettings($form);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.