Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / devel / webprofiler / webprofiler.module
1 <?php
2
3 /**
4  * @file
5  * Legacy Webprofiler module file.
6  */
7
8 /**
9  * Implements hook_theme().
10  */
11 function webprofiler_theme() {
12   return [
13     'webprofiler_loader' => [
14       'template' => 'Profiler/webprofiler_loader',
15       'variables' => ['token' => NULL, 'profiler_url' => NULL],
16     ],
17     'webprofiler_toolbar' => [
18       'template' => 'Profiler/webprofiler_toolbar',
19       'variables' => [
20         'token' => NULL,
21         'toolbar' => NULL,
22       ],
23     ],
24     'webprofiler_panel' => [
25       'template' => 'Profiler/webprofiler_panel',
26       'variables' => [
27         'panel' => NULL,
28       ],
29     ],
30     'webprofiler_dashboard' => [
31       'template' => 'Profiler/webprofiler_dashboard',
32       'variables' => [
33         'profile' => [],
34         'panels' => [],
35         'spinner_path' => NULL,
36       ],
37     ],
38   ];
39 }
40
41 /**
42  * Implements hook_cache_flush().
43  */
44 function webprofiler_cache_flush() {
45   $config = \Drupal::configFactory()->get('webprofiler.config');
46
47   if ($config->get('purge_on_cache_clear')) {
48     $profiler = \Drupal::service('profiler');
49     $profiler->purge();
50   }
51 }