| @@ 119-129 (lines=11) @@ | ||
| 116 | * @return array |
|
| 117 | * The filter argument if any exposed filters are available. |
|
| 118 | */ |
|
| 119 | protected function getFilterArguments(DisplayPluginInterface $display, $id) { |
|
| 120 | $filters = array_filter($display->getOption('filters') ?: [], function($filter) { |
|
| 121 | return array_key_exists('exposed', $filter) && $filter['exposed']; |
|
| 122 | }); |
|
| 123 | ||
| 124 | return !empty($filters) ? [ |
|
| 125 | 'filter' => [ |
|
| 126 | 'type' => $display->getGraphQLFilterInputName(), |
|
| 127 | ], |
|
| 128 | ] : []; |
|
| 129 | } |
|
| 130 | ||
| 131 | /** |
|
| 132 | * Helper function to retrieve the pager arguments if the display is paged. |
|
| @@ 78-88 (lines=11) @@ | ||
| 75 | * @return array |
|
| 76 | * The filter argument if any exposed filters are available. |
|
| 77 | */ |
|
| 78 | protected function getFilterArguments(DisplayPluginInterface $display, $id) { |
|
| 79 | $filters = array_filter($display->getOption('filters') ?: [], function ($filter) { |
|
| 80 | return array_key_exists('exposed', $filter) && $filter['exposed']; |
|
| 81 | }); |
|
| 82 | ||
| 83 | return !empty($filters) ? [ |
|
| 84 | 'filter' => [ |
|
| 85 | 'type' => $display->getGraphQLFilterInputName(), |
|
| 86 | ], |
|
| 87 | ] : []; |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * Helper function to retrieve the pager arguments if the display is paged. |
|