function FormHooks::ensureAdvancedSettings

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

Ensure correct settings for advanced, meta and revision form elements.

Parameters

array $form: The form.

File

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

Class

FormHooks
Provides form related hook implementations.

Namespace

Drupal\admin\Hook

Code

private function ensureAdvancedSettings(array &$form) : void {
  $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';
}

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