Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
26 / 26 |
|
100.00% |
1 / 1 |
CRAP | n/a |
0 / 0 |
|
visitors_geoip_views_data_alter | |
100.00% |
26 / 26 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * @file |
5 | * Visitors GeoIP module file. |
6 | */ |
7 | |
8 | /** |
9 | * Implements hook_views_data_alter(). |
10 | */ |
11 | function visitors_geoip_views_data_alter(array &$data) { |
12 | $data['visitors']['location_region'] = [ |
13 | 'title' => t('Region'), |
14 | 'help' => t('The region of the visitor.'), |
15 | 'field' => [ |
16 | 'id' => 'standard', |
17 | ], |
18 | 'filter' => [ |
19 | 'id' => 'string', |
20 | ], |
21 | 'argument' => [ |
22 | 'id' => 'string', |
23 | ], |
24 | ]; |
25 | $data['visitors']['location_city'] = [ |
26 | 'title' => t('City'), |
27 | 'help' => t('The city of the visitor.'), |
28 | 'field' => [ |
29 | 'id' => 'standard', |
30 | ], |
31 | 'filter' => [ |
32 | 'id' => 'string', |
33 | ], |
34 | 'argument' => [ |
35 | 'id' => 'string', |
36 | ], |
37 | ]; |
38 | } |