GraphQL.php in GraphQL 8
File
src/Plugin/views/display/GraphQL.php
View source
<?php
namespace Drupal\graphql\Plugin\views\display;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
class GraphQL extends DisplayPluginBase {
protected $usesAJAX = FALSE;
protected $usesPager = FALSE;
protected $usesMore = FALSE;
protected $usesAreas = FALSE;
protected $usesOptions = TRUE;
public function getType() {
return 'graphql';
}
public function usesFields() {
return FALSE;
}
public function usesExposed() {
return TRUE;
}
public function displaysExposed() {
return FALSE;
}
protected function defineOptions() {
$options = parent::defineOptions();
$options['row']['contains']['type']['default'] = 'data_entity';
$options['defaults']['default']['style'] = FALSE;
$options['defaults']['default']['row'] = FALSE;
unset($options['exposed_form']);
unset($options['exposed_block']);
unset($options['css_class']);
return $options;
}
public function optionsSummary(&$categories, &$options) {
parent::optionsSummary($categories, $options);
unset($categories['format'], $categories['fields'], $categories['title']);
unset($categories['page'], $categories['exposed'], $categories['access']);
unset($options['show_admin_links'], $options['analyze-theme'], $options['link_display']);
unset($options['show_admin_links'], $options['analyze-theme'], $options['link_display']);
unset($options['style'], $options['row'], $options['title'], $options['access']);
unset($options['exposed_form'], $options['exposed_block'], $options['css_class']);
unset($options['query'], $options['group_by']);
}
public function execute() {
return $this->view
->execute();
}
}
Classes
Name |
Description |
GraphQL |
Provides a display plugin for GraphQL views. |