node_form_system_themes_admin_form_alter(&$form, FormStateInterface $form_state, $form_id)
Implements hook_form_FORM_ID_alter().
Alters the theme form to use the admin theme on node editing.
node_form_system_themes_admin_form_submit()
function node_form_system_themes_admin_form_alter(&$form, FormStateInterface $form_state, $form_id) { $form['admin_theme']['use_admin_theme'] = array( '#type' => 'checkbox', '#title' => t('Use the administration theme when editing or creating content'), '#description' => t('Control which roles can "View the administration theme" on the <a href=":permissions">Permissions page</a>.', array(':permissions' => Url::fromRoute('user.admin_permissions')->toString())), '#default_value' => \Drupal::configFactory()->getEditable('node.settings')->get('use_admin_theme'), ); $form['#submit'][] = 'node_form_system_themes_admin_form_submit'; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!node!node.module/function/node_form_system_themes_admin_form_alter/8.1.x