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

Implements hook_preprocess_layout().

File

modules/dashboard/dashboard.module, line 216
Provides an administrative dashboard.

Code

function dashboard_preprocess_layout(&$variables) {
  /* @var Layout $layout */
  $layout = $variables['layout'];
  if (is_a($layout, 'Layout') && $layout->hasContexts(array('dashboard'))) {
    // Include a dashboard-specific style sheet.
    $css_path = backdrop_get_path('module', 'dashboard') . '/css/dashboard.css';
    backdrop_add_css($css_path);
    $variables['classes'][] = 'dashboard';
  }
}