You are here

function uc_report_page_attachments in Ubercart 8.4

Implements hook_page_attachments().

File

uc_report/uc_report.module, line 259
Displays reports on sales, customers, and products to store admin.

Code

function uc_report_page_attachments(&$page) {

  // Load reports CSSs on all reports pages.
  $route = \Drupal::routeMatch()
    ->getRouteName();
  if (substr($route, 0, 10) == 'uc_report.') {
    $page['#attached']['library'][] = 'uc_report/uc_report.styles';
  }
}