-
Notifications
You must be signed in to change notification settings - Fork 0
/
varbase_total_control.module
executable file
·50 lines (46 loc) · 1.35 KB
/
varbase_total_control.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* @file
* {@inheritdoc}
*/
/**
* Implements hook_element_info_alter().
*/
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)) {
// Attach our extra CSS for Varbase dashboard.
$attachments['#attached']['library'][] = 'varbase_total_control/vtc';
}
}
/**
* Implements hook_theme().
*/
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',
],
];
}