varbase_total_control.module in Varbase Total Control Dashboard 8
File
varbase_total_control.module
View source
<?php
function varbase_total_control_page_attachments(array &$attachments) {
$routers = [
'page_manager.page_view_total_control_dashboard_total_control_dashboard-panels_variant-1',
'page_manager.page_view_total_control_dashboard_total_control_dashboard-panels_variant-0',
];
if (in_array(\Drupal::routeMatch()
->getRouteName(), $routers)) {
$attachments['#attached']['library'][] = 'varbase_total_control/vtc';
$moduleHandler = \Drupal::service('module_handler');
if ($moduleHandler
->moduleExists('masonry')) {
$attachments['#attached']['library'][] = 'varbase_total_control/vtc-masonry';
}
}
}
function varbase_total_control_theme($existing, $type, $theme, $path) {
return [
'block__views_block__varbase_google_analytics_summary_top_pages_block' => [
'base hook' => 'block',
],
'block__views_block__varbase_google_analytics_summary_top_sources_block' => [
'base hook' => 'block',
],
'block__varbase_total_control' => [
'base hook' => 'block',
],
'block__total_control' => [
'base hook' => 'block',
],
'block__views_block__control_content_panes_pane_tc_new' => [
'base hook' => 'block',
],
'block__views_block__varbase_google_analytics_summary_sessions_and_pageviews' => [
'base hook' => 'block',
],
'block__varbase_dashboard_user' => [
'base hook' => 'block',
],
];
}