Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / redirect / modules / redirect_404 / redirect_404.views.inc
1 <?php
2
3 /**
4  * @file
5  * Provide views data for redirect_404.module.
6  */
7
8 use Drupal\redirect_404\SqlRedirectNotFoundStorage;
9
10 /**
11  * Implements hook_views_data().
12  */
13 function redirect_404_views_data() {
14   $data = [];
15
16   // Only define views data if the service uses our specific implementation.
17   if (!\Drupal::service('redirect.not_found_storage') instanceof SqlRedirectNotFoundStorage) {
18     return $data;
19   }
20
21   $data['redirect_404']['table']['group'] = t('Redirect 404');
22
23   $data['redirect_404']['table']['base'] = [
24     'field' => '',
25     'title' => t('Fix 404 pages'),
26     'help' => t('Overview for 404 error paths with no redirect assigned yet.'),
27   ];
28
29   $data['redirect_404']['path'] = [
30     'title' => t('Path'),
31     'help' => t('The path of the request.'),
32     'field' => [
33       'id' => 'standard',
34     ],
35     'filter' => [
36       'id' => 'string',
37     ],
38   ];
39
40   $data['redirect_404']['langcode'] = [
41     'title' => t('Language'),
42     'help' => t('The language of this request.'),
43     'field' => [
44       'id' => 'redirect_404_langcode',
45     ],
46     'filter' => [
47       'id' => 'language',
48     ],
49   ];
50
51   $data['redirect_404']['count'] = [
52     'title' => t('Count'),
53     'help' => t('The number of requests with that path and language.'),
54     'field' => [
55       'id' => 'numeric',
56       'click sortable' => TRUE,
57     ],
58     'filter' => [
59       'id' => 'numeric',
60     ],
61   ];
62
63   $data['redirect_404']['timestamp'] = [
64     'title' => t('Timestamp'),
65     'help' => t('The timestamp of the last request with that path and language.'),
66     'field' => [
67       'id' => 'date',
68       'click sortable' => TRUE,
69     ],
70     'filter' => [
71       'id' => 'date',
72     ],
73   ];
74
75   $data['redirect_404']['resolved'] = [
76     'title' => t('Resolved'),
77     'help' => t('Whether or not this path has a redirect assigned.'),
78     'field' => [
79       'id' => 'boolean',
80     ],
81     'filter' => [
82       'id' => 'boolean',
83       'label' => t('Resolved'),
84       'use_equal' => TRUE,
85     ],
86   ];
87
88   $data['redirect_404']['redirect_404_operations'] = [
89     'title' => t('Operations'),
90     'help' => t('Provide operation buttons to handle the 404 path.'),
91     'field' => [
92       'id' => 'redirect_404_operations',
93       'additional fields' => ['path', 'langcode'],
94       'real field' => 'path',
95     ],
96   ];
97
98   return $data;
99 }