1 | <?php |
||
27 | class GraphQL extends DisplayPluginBase { |
||
28 | /** |
||
29 | * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::$usesAJAX. |
||
30 | */ |
||
31 | protected $usesAJAX = FALSE; |
||
32 | |||
33 | /** |
||
34 | * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::$usesPager. |
||
35 | */ |
||
36 | protected $usesPager = FALSE; |
||
37 | |||
38 | /** |
||
39 | * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::$usesMore. |
||
40 | */ |
||
41 | protected $usesMore = FALSE; |
||
42 | |||
43 | /** |
||
44 | * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::$usesAreas. |
||
45 | */ |
||
46 | protected $usesAreas = FALSE; |
||
47 | |||
48 | /** |
||
49 | * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::$usesOptions. |
||
50 | */ |
||
51 | protected $usesOptions = TRUE; |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function getType() { |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function usesFields() { |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function usesExposed() { |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function displaysExposed() { |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | protected function defineOptions() { |
||
103 | |||
104 | /** |
||
105 | * Get the user defined query name or the default one. |
||
106 | * |
||
107 | * @return string |
||
108 | * Query name. |
||
109 | */ |
||
110 | public function getGraphQLQueryName() { |
||
113 | |||
114 | /** |
||
115 | * Gets the result name. |
||
116 | * |
||
117 | * @return string |
||
118 | * Result name. |
||
119 | */ |
||
120 | public function getGraphQLResultName() { |
||
123 | |||
124 | /** |
||
125 | * Gets the row name. |
||
126 | * |
||
127 | * @return string |
||
128 | * Row name. |
||
129 | */ |
||
130 | public function getGraphQLRowName() { |
||
133 | |||
134 | /** |
||
135 | * Gets the filter input name.. |
||
136 | * |
||
137 | * @return string |
||
138 | * Result name. |
||
139 | */ |
||
140 | public function getGraphQLFilterInputName() { |
||
143 | |||
144 | /** |
||
145 | * Gets the contextual filter input name. |
||
146 | * |
||
147 | * @return string |
||
148 | * Result name. |
||
149 | */ |
||
150 | public function getGraphQLContextualFilterInputName() { |
||
153 | |||
154 | /** |
||
155 | * Returns the formatted name. |
||
156 | * |
||
157 | * @param string|null $suffix |
||
158 | * Id suffix, eg. row, result. |
||
159 | * @param bool $type |
||
160 | * Whether to use camel- or snake case. Uses camel case if TRUE. Defaults to |
||
161 | * FALSE. |
||
162 | * |
||
163 | * @return string The id. |
||
164 | * The id. |
||
165 | */ |
||
166 | public function getGraphQLName($suffix = NULL, $type = FALSE) { |
||
179 | |||
180 | /** |
||
181 | * {@inheritdoc} |
||
182 | */ |
||
183 | public function optionsSummary(&$categories, &$options) { |
||
210 | |||
211 | /** |
||
212 | * {@inheritdoc} |
||
213 | */ |
||
214 | public function buildOptionsForm(&$form, FormStateInterface $form_state) { |
||
228 | |||
229 | /** |
||
230 | * {@inheritdoc} |
||
231 | */ |
||
232 | public function submitOptionsForm(&$form, FormStateInterface $form_state) { |
||
241 | |||
242 | /** |
||
243 | * {@inheritdoc} |
||
244 | */ |
||
245 | public function execute() { |
||
248 | |||
249 | /** |
||
250 | * {@inheritdoc} |
||
251 | */ |
||
252 | public function render() { |
||
265 | } |
||
266 |