1 dashboard.module | dashboard_preprocess_block(&$variables) |
Implements hook_preprocess_block().
File
- core/
modules/ dashboard/ dashboard.module, line 228 - Provides an administrative dashboard.
Code
function dashboard_preprocess_block(&$variables) {
/* @var Layout $layout */
$layout = $variables['layout'];
if (is_a($layout, 'Layout') && $layout->hasContexts(array('dashboard'))) {
$block = $variables['block'];
$region_name = $layout->getBlockPosition($block->uuid);
if (!in_array($region_name, array('header', 'footer'))) {
// Add the generic class for administration panels, same as on pages like
// admin/config and admin/structure. Helps place icons. Adds borders.
$variables['classes'][] = 'block-dashboard';
$variables['classes'][] = 'admin-panel';
}
}
}