You are here

function claro_form_node_form_alter in Drupal 9

Same name and namespace in other branches
  1. 8 core/themes/claro/claro.theme \claro_form_node_form_alter()

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

Changes vertical tabs to container.

File

core/themes/claro/claro.theme, line 549
Functions to support theming in the Claro theme.

Code

function claro_form_node_form_alter(&$form, FormStateInterface $form_state) {
  $form['#theme'] = [
    'node_edit_form',
  ];
  $form['#attached']['library'][] = 'claro/node-form';
  $form['advanced']['#type'] = 'container';
  $form['advanced']['#accordion'] = TRUE;
  $form['meta']['#type'] = 'container';
  $form['meta']['#access'] = TRUE;
  $form['revision_information']['#type'] = 'container';
  $form['revision_information']['#group'] = 'meta';
  $form['revision_information']['#attributes']['class'][] = 'entity-meta__revision';
}