Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / ctools / modules / ctools_views / ctools_views.module
1 <?php
2
3 use Drupal\views\Plugin\views\display\Block as CoreBlock;
4 use Drupal\ctools_views\Plugin\Display\Block;
5
6 /**
7  * Implements hook_views_plugins_display_alter().
8  */
9 function ctools_views_views_plugins_display_alter(&$displays) {
10   if (!empty($displays['block']['class']) && $displays['block']['class'] == CoreBlock::class) {
11     $displays['block']['class'] = Block::class;
12   }
13 }
14
15 /**
16  * Implements hook_config_schema_info_alter().
17  */
18 function ctools_views_config_schema_info_alter(&$definitions) {
19   // Add to the views block plugin schema.
20   $definitions['views_block']['mapping']['pager'] = [
21     'type' => 'string',
22     'label' => 'Pager type'
23   ];
24   $definitions['views_block']['mapping']['fields'] = [
25     'type' => 'sequence',
26     'label' => 'Fields settings',
27     'sequence' => [
28       [
29         'type' => 'mapping',
30         'label' => 'Field settings',
31         'mapping' => [
32           'hide' => [
33             'type' => 'boolean',
34             'label' => 'Hide field',
35           ],
36           'weight' => [
37             'type' => 'integer',
38             'label' => 'Field weight',
39           ],
40         ],
41       ],
42     ],
43   ];
44   $definitions['views_block']['mapping']['filter'] = [
45     'type' => 'sequence',
46     'label' => 'Filters settings',
47     'sequence' => [
48       [
49         'type' => 'mapping',
50         'label' => 'Filter settings',
51         'mapping' => [
52           'type' => [
53             'type' => 'string',
54             'label' => 'Plugin id',
55           ],
56           'disable' => [
57             'type' => 'boolean',
58             'label' => 'Disable filter',
59           ],
60         ],
61       ],
62     ],
63   ];
64   $definitions['views_block']['mapping']['sort'] = [
65     'type' => 'sequence',
66     'label' => 'Sort settings',
67     'sequence' => [
68       [
69         'type' => 'string',
70         'label' => 'Sort order value',
71       ],
72     ],
73   ];
74   $definitions['views_block']['mapping']['pager_offset'] = [
75     'type' => 'integer',
76     'label' => 'Pager offset'
77   ];
78
79   // Add to the views block display plugin schema.
80   $definitions['views.display.block']['mapping']['allow']['mapping']['offset'] = [
81     'type' => 'string',
82     'label' => 'Pager offset',
83   ];
84   $definitions['views.display.block']['mapping']['allow']['mapping']['pager'] = [
85     'type' => 'string',
86     'label' => 'Pager type',
87   ];
88   $definitions['views.display.block']['mapping']['allow']['mapping']['hide_fields'] = [
89     'type' => 'string',
90     'label' => 'Hide fields',
91   ];
92   $definitions['views.display.block']['mapping']['allow']['mapping']['sort_fields'] = [
93     'type' => 'string',
94     'label' => 'Sort fields',
95   ];
96   $definitions['views.display.block']['mapping']['allow']['mapping']['disable_filters'] = [
97     'type' => 'string',
98     'label' => 'Disable filters',
99   ];
100   $definitions['views.display.block']['mapping']['allow']['mapping']['configure_sorts'] = [
101     'type' => 'string',
102     'label' => 'Configure sorts',
103   ];
104 }