template_preprocess_admin_page(&$variables)
Prepares variables for administrative index page templates.
Default template: admin-page.html.twig.
$variables: An associative array containing:
function template_preprocess_admin_page(&$variables) { $variables['system_compact_link'] = array( '#type' => 'system_compact_link', ); $variables['containers'] = array(); $stripe = 0; foreach ($variables['blocks'] as $block) { if (!empty($block['content']['#content'])) { if (empty($block['position'])) { // Perform automatic striping. $block['position'] = ++$stripe % 2 ? 'left' : 'right'; } $variables['containers'][$block['position']]['blocks'][] = array( '#theme' => 'admin_block', '#block' => $block, ); } } }
© 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!system!system.admin.inc/function/template_preprocess_admin_page/8.1.x