template_preprocess_admin_block_content(&$variables)
Prepares variables for administrative content block templates.
Default template: admin-block-content.html.twig.
$variables: An associative array containing:
function template_preprocess_admin_block_content(&$variables) { if (!empty($variables['content'])) { $variables['compact'] = system_admin_compact_mode(); foreach ($variables['content'] as $key => $item) { $variables['content'][$key]['link'] = \Drupal::l($item['title'], $item['url']); if (!$variables['compact'] && isset($item['description'])) { $variables['content'][$key]['description'] = ['#markup' => $item['description']]; } else { $variables['content'][$key]['description'] = FALSE; } } } }
© 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_block_content/8.1.x