1.20.x dashboard.module dashboard_preprocess_block(&$variables)

Implements hook_preprocess_block().

File

modules/dashboard/dashboard.module, line 230
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'][] = 'admin-panel';
    }
  }
}