class ElasticsearchViewsQuery in Elasticsearch Connector 8.5
Same name and namespace in other branches
- 8.7 modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php \Drupal\elasticsearch_connector_views\Plugin\views\query\ElasticsearchViewsQuery
- 8.2 modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php \Drupal\elasticsearch_connector_views\Plugin\views\query\ElasticsearchViewsQuery
- 8.6 modules/elasticsearch_connector_views/src/Plugin/views/query/ElasticsearchViewsQuery.php \Drupal\elasticsearch_connector_views\Plugin\views\query\ElasticsearchViewsQuery
Defines a Views query class for searching on Search API indexes.
Plugin annotation
@ViewsQuery(
id = "elasticsearch_connector_views_query",
title = @Translation("Elasticsearch Connector Views Query"),
help = @Translation("The query will be generated and run using the
Elasticsearch API.")
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\views\Plugin\views\PluginBase implements DependentPluginInterface, ContainerFactoryPluginInterface, TrustedCallbackInterface, ViewsPluginInterface
- class \Drupal\views\Plugin\views\query\QueryPluginBase implements CacheableDependencyInterface
- class \Drupal\elasticsearch_connector_views\Plugin\views\query\ElasticsearchViewsQuery
- class \Drupal\views\Plugin\views\query\QueryPluginBase implements CacheableDependencyInterface
- class \Drupal\views\Plugin\views\PluginBase implements DependentPluginInterface, ContainerFactoryPluginInterface, TrustedCallbackInterface, ViewsPluginInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of ElasticsearchViewsQuery
File
- modules/
elasticsearch_connector_views/ src/ Plugin/ views/ query/ ElasticsearchViewsQuery.php, line 27
Namespace
Drupal\elasticsearch_connector_views\Plugin\views\queryView source
class ElasticsearchViewsQuery extends QueryPluginBase {
/**
* Number of results to display.
*
* @var int
*/
protected $limit;
/**
* Offset of first displayed result.
*
* @var int
*/
protected $offset;
/**
* The Elasticsearch index name.
*
* @var string
*/
protected $index;
/**
* Elasticsearch types to be fetched.
*
* @var array
*/
protected $elasticsearchTypes;
/**
* @var Cluster
*/
protected $elasticsearchCluster;
/**
* The query that will be executed.
*
* @var \nodespark\DESConnector\ClientInterface
*/
protected $elasticsearchClient;
/**
* Array of all encountered errors.
*
* Each of these is fatal, meaning that a non-empty $errors property will
* result in an empty result being returned.
*
* @var array
*/
protected $errors = array();
/**
* Whether to abort the search instead of executing it.
*
* @var bool
*/
protected $abort = FALSE;
/**
* The properties that should be retrieved from result items.
*
* The array is keyed by datasource ID (which might be NULL) and property
* path, the values are the associated combined property paths.
*
* @var string[][]
*/
protected $retrievedProperties = array();
/**
* The query's conditions representing the different Views filter groups.
*
* @var array
*/
protected $conditions = array();
/**
* The conjunction with which multiple filter groups are combined.
*
* @var string
*/
protected $groupOperator = 'AND';
/**
* The logger to use for log messages.
*
* @var \Psr\Log\LoggerInterface|null
*/
protected $logger;
/**
* The entity type manager service.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
/** @var static $plugin */
$plugin = parent::create($container, $configuration, $plugin_id, $plugin_definition);
/** @var \Psr\Log\LoggerInterface $logger */
$logger = $container
->get('logger.factory')
->get('elasticsearch_connector_views');
$plugin
->setLogger($logger);
$entity_type_manager = $container
->get('entity_type.manager');
$plugin
->setEntityTypeManager($entity_type_manager);
return $plugin;
}
/**
* Retrieves the logger to use for log messages.
*
* @return \Psr\Log\LoggerInterface
* The logger to use.
*/
public function getLogger() {
return $this->logger ?: \Drupal::logger('elasticsearch_connector_views');
}
/**
* Sets the logger to use for log messages.
*
* @param \Psr\Log\LoggerInterface $logger
* The new logger.
*
* @return $this
*/
public function setLogger(LoggerInterface $logger) {
$this->logger = $logger;
return $this;
}
/**
* Sets the entity type manager service.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager service.
*/
public function setEntityTypeManager(EntityTypeManagerInterface $entity_type_manager) {
$this->entityTypeManager = $entity_type_manager;
}
/**
* {@inheritdoc}
*/
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
try {
parent::init($view, $display, $options);
$view_id = $this->view->storage
->get('base_table');
$data = Views::viewsData()
->get($view_id);
$cluster_id = $data['table']['base']['cluster_id'];
$this->index = $data['table']['base']['index'];
$this->elasticsearchTypes[$data['table']['base']['type']] = $data['table']['base']['type'];
$this->elasticsearchCluster = $this->entityTypeManager
->getStorage('elasticsearch_cluster')
->load($cluster_id);
$clientManager = \Drupal::service('elasticsearch_connector.client_manager');
$this->elasticsearchClient = $clientManager
->getClientForCluster($this->elasticsearchCluster);
} catch (\Exception $e) {
$this
->abort($e
->getMessage());
}
}
/**
* @param $table
* Table name.
* @param $field
* Field name.
* @param string $alias
* Alias.
* @param array $params
* Params array.
*/
public function addField($table, $field, $alias = '', $params = array()) {
$this->fields[$field] = $field;
}
/**
* Ensure a table exists in the queue; if it already exists it won't
* do anything, but if it does not it will add the table queue. It will ensure
* a path leads back to the relationship table.
*
* @param $table
* The not aliased name of the table to ensure.
* @param $relationship
* The relationship to ensure the table links to. Each relationship will
* get a unique instance of the table being added. If not specified,
* will be the primary table.
* @param \Drupal\views\Plugin\views\join\JoinPluginBase $join
* A Join object (or derived object) to join the alias in.
*
* @return
* The alias used to refer to this specific table, or NULL if the table
* cannot be ensured.
*/
public function ensureTable($table, $relationship = NULL, JoinPluginBase $join = NULL) {
// TODO: Read the documentation about this.
return NULL;
}
/**
* {@inheritdoc}
*/
public function defineOptions() {
return parent::defineOptions() + array(
'bypass_access' => array(
'default' => FALSE,
),
'skip_access' => array(
'default' => FALSE,
),
'parse_mode' => array(
'default' => 'terms',
),
);
}
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['bypass_access'] = array(
'#type' => 'checkbox',
'#title' => $this
->t('Bypass access checks'),
'#description' => $this
->t('If the underlying search index has access checks enabled (e.g., through the "Content access" processor), this option allows you to disable them for this view. This will never disable any filters placed on this view.'),
'#default_value' => $this->options['bypass_access'],
);
if ($this
->getEntityTypes(TRUE)) {
$form['skip_access'] = array(
'#type' => 'checkbox',
'#title' => $this
->t('Skip entity access checks'),
'#description' => $this
->t("By default, an additional access check will be executed for each entity returned by the search query. However, since removing results this way will break paging and result counts, it is preferable to configure the view in a way that it will only return accessible results. If you are sure that only accessible results will be returned in the search, or if you want to show results to which the user normally wouldn't have access, you can enable this option to skip those additional access checks. This should be used with care."),
'#default_value' => $this->options['skip_access'],
'#weight' => -1,
);
$form['bypass_access']['#states']['visible'][':input[name="query[options][skip_access]"]']['checked'] = TRUE;
}
// @todo Move this setting to the argument and filter plugins where it makes
// more sense for users.
$form['parse_mode'] = array(
'#type' => 'select',
'#title' => $this
->t('Parse mode'),
'#description' => $this
->t('Choose how the search keys will be parsed.'),
'#options' => array(),
'#default_value' => $this->options['parse_mode'],
);
// foreach ($this->query->parseModes() as $key => $mode) {
// $form['parse_mode']['#options'][$key] = $mode['name'];
// if (!empty($mode['description'])) {
// $states['visible'][':input[name="query[options][parse_mode]"]']['value'] = $key;
// $form["parse_mode_{$key}_description"] = array(
// '#type' => 'item',
// '#title' => $mode['name'],
// '#description' => $mode['description'],
// '#states' => $states,
// );
// }
// }
}
/**
* {@inheritdoc}
*/
public function build(ViewExecutable $view) {
$this->view = $view;
// Store the view in the object to be able to use it later.
$this->view = $view;
$view
->initPager();
// Let the pager modify the query to add limits.
$view->pager
->query();
if ($this
->shouldAbort()) {
return;
}
// Set aliases of the fields.
foreach ($view->field as $field_name => &$field) {
$field->field_alias = $field_name;
$field->aliases['entity_type'] = 'entity_type';
}
// Add fields to the query so they will be shown in solr document.
$this->params['fields'] = array_keys($view->field);
$this->params['fields'][] = '_source';
$params = array();
$params['size'] = $view->pager
->getItemsPerPage();
$params['from'] = $view->pager
->getCurrentPage() * $view->pager
->getItemsPerPage();
// If we display all items without pager remove the size limit to return
// all documents from elasticsearch.
if ($params['size'] == 0) {
unset($params['size']);
}
// Add fields.
// We are specifying which fields to be visible!
$params['_source'] = array();
if (isset($this->params['fields'])) {
$params['_source'] = array_merge($params['_source'], $this->params['fields']);
}
if (!empty($this->where['conditions'])) {
$params['query'] = [
'bool' => [
'must' => [
'match' => $this->where['conditions'],
],
],
];
}
// Add sorting.
if (!empty($this->sort_fields)) {
$params['sort'] = $this
->buildSortArray();
}
$this->query_params = $params;
// Export parameters for preview.
$view->build_info['query'] = var_export($params, TRUE);
}
/**
* @return array
*/
protected function buildSortArray() {
$sort = array();
foreach ($this->sort_fields as $field => $order) {
$sort[] = array(
$field => $order,
);
}
return $sort;
}
/**
* Build the filter parameters for Elasticsearch.
*
* @param array $where
* All where causes for the query.
*
* @return array
* The ready to use filters in Elasticsearch body.
*/
protected function buildFilterArray($where) {
$filter = array();
foreach ($where as $wh) {
foreach ($wh['conditions'] as $cond) {
$filter[Unicode::strtolower($wh['type'])][] = $cond['field'];
}
}
if (count($filter) > 1) {
$filter = array(
Unicode::strtolower($this->group_operator) => $filter,
);
}
return $filter;
}
/**
* {@inheritdoc}
*/
public function alter(ViewExecutable $view) {
\Drupal::moduleHandler()
->invokeAll('views_query_alter', array(
$view,
$this,
));
}
/**
* {@inheritdoc}
*/
public function execute(ViewExecutable $view) {
$view->result = array();
$view->total_rows = 0;
$view->execute_time = 0;
$index = $this
->getIndex();
$type = $this
->getSearchTypes();
try {
$start = microtime(TRUE);
$client = $this->elasticsearchClient;
if ($client) {
$view->execute_time = microtime(TRUE) - $start;
}
// Execute the search.
$response = $client
->search(array(
'index' => $index,
'type' => $type,
'body' => $this->query_params,
))
->getRawResponse();
// Store results.
if (!empty($response['hits']['hits'])) {
$item_index = 0;
foreach ($response['hits']['hits'] as $doc) {
$result_doc = array();
foreach ($doc['_source'] as $field_name => $field_value) {
if (is_array($field_value)) {
// TODO: Handle this by implementing the Multivalue interface in D8
// Handle multivalue with concatenation for now.
$result_doc[$field_name] = implode(' | ', $field_value);
}
else {
$result_doc[$field_name] = $field_value;
}
}
$result_doc['_source'] = $doc['_source'];
$result_doc['index'] = $item_index;
$view->result[] = new ResultRow($result_doc);
// Increment the index item.
$item_index++;
}
}
// $view->result = iterator_to_array($view->result);
// Store the results.
$view->pager->total_items = $view->total_rows = $response['hits']['total'];
$view->pager
->updatePageInfo();
// We shouldn't use $results['performance']['complete'] here, since
// extracting the results probably takes considerable time as well.
$view->execute_time = $response['took'];
} catch (\Exception $e) {
$this->errors[] = $e
->getMessage();
}
if ($this->errors) {
foreach ($this->errors as $msg) {
drupal_set_message($msg, 'error');
}
$view->result = array();
$view->total_rows = 0;
$view->execute_time = 0;
}
}
/**
* Aborts this search query.
*
* Used by handlers to flag a fatal error which should not be displayed but
* still lead to the view returning empty and the search not being executed.
*
* @param string|null $msg
* Optionally, a translated, unescaped error message to display.
*/
public function abort($msg = NULL) {
if ($msg) {
$this->errors[] = $msg;
}
$this->abort = TRUE;
}
/**
* Checks whether this query should be aborted.
*
* @return bool
* TRUE if the query should/will be aborted, FALSE otherwise.
*
* @see SearchApiQuery::abort()
*/
public function shouldAbort() {
return $this->abort;
}
/**
* Retrieves the account object to use for access checks for this query.
*
* @return \Drupal\Core\Session\AccountInterface|null
* The account for which to check access to returned or displayed entities.
* Or NULL to use the currently logged-in user.
*/
public function getAccessAccount() {
// $account = $this->getOption('elasticsearch_connector_views_access_account');
// if ($account && is_scalar($account)) {
// $account = User::load($account);
// }
return FALSE;
}
/**
* Returns the Search API query object used by this Views query.
*
* @return null
* The search query object used internally by this plugin, if any has been
* successfully created. NULL otherwise.
*/
public function getSearchApiQuery() {
return $this->query;
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
return $dependencies;
}
/**
* Retrieves the index associated with this search.
*
* @return string
* The index this query should be executed on.
*/
public function getIndex() {
return $this->index;
}
/**
*
*/
public function getClusterId() {
return $this->elasticsearchCluster->cluster_id;
}
/**
*
*/
public function getSearchTypes() {
return implode(',', $this->elasticsearchTypes);
}
/**
*
*/
public function getElasticsearchClient() {
return $this->elasticsearchClient;
}
/**
* // TODO: Comment.
*
* @param $table
* @param null $field
* @param string $order
* @param string $alias
* @param array $params
*/
public function addOrderBy($table, $field = NULL, $order = 'ASC', $alias = '', $params = array()) {
// TODO: Implement the addOrderBy method.
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
ElasticsearchViewsQuery:: |
protected | property | Whether to abort the search instead of executing it. | |
ElasticsearchViewsQuery:: |
protected | property | The query's conditions representing the different Views filter groups. | |
ElasticsearchViewsQuery:: |
protected | property | The query that will be executed. | |
ElasticsearchViewsQuery:: |
protected | property | ||
ElasticsearchViewsQuery:: |
protected | property | Elasticsearch types to be fetched. | |
ElasticsearchViewsQuery:: |
protected | property | The entity type manager service. | |
ElasticsearchViewsQuery:: |
protected | property | Array of all encountered errors. | |
ElasticsearchViewsQuery:: |
protected | property | The conjunction with which multiple filter groups are combined. | |
ElasticsearchViewsQuery:: |
protected | property | The Elasticsearch index name. | |
ElasticsearchViewsQuery:: |
protected | property |
Number of results to display. Overrides QueryPluginBase:: |
|
ElasticsearchViewsQuery:: |
protected | property | The logger to use for log messages. | |
ElasticsearchViewsQuery:: |
protected | property | Offset of first displayed result. | |
ElasticsearchViewsQuery:: |
protected | property | The properties that should be retrieved from result items. | |
ElasticsearchViewsQuery:: |
public | function | Aborts this search query. | |
ElasticsearchViewsQuery:: |
public | function | ||
ElasticsearchViewsQuery:: |
public | function | // TODO: Comment. | |
ElasticsearchViewsQuery:: |
public | function |
Let modules modify the query just prior to finalizing it. Overrides QueryPluginBase:: |
|
ElasticsearchViewsQuery:: |
public | function |
Builds the necessary info to execute the query. Overrides QueryPluginBase:: |
|
ElasticsearchViewsQuery:: |
protected | function | Build the filter parameters for Elasticsearch. | |
ElasticsearchViewsQuery:: |
public | function |
Provide a form to edit options for this plugin. Overrides PluginBase:: |
|
ElasticsearchViewsQuery:: |
protected | function | ||
ElasticsearchViewsQuery:: |
public | function |
Calculates dependencies for the configured plugin. Overrides QueryPluginBase:: |
|
ElasticsearchViewsQuery:: |
public static | function |
Creates an instance of the plugin. Overrides PluginBase:: |
|
ElasticsearchViewsQuery:: |
public | function |
Information about options for all kinds of purposes will be held here. Overrides PluginBase:: |
|
ElasticsearchViewsQuery:: |
public | function | Ensure a table exists in the queue; if it already exists it won't do anything, but if it does not it will add the table queue. It will ensure a path leads back to the relationship table. | |
ElasticsearchViewsQuery:: |
public | function |
Executes the query and fills the associated view object with according
values. Overrides QueryPluginBase:: |
|
ElasticsearchViewsQuery:: |
public | function | Retrieves the account object to use for access checks for this query. | |
ElasticsearchViewsQuery:: |
public | function | ||
ElasticsearchViewsQuery:: |
public | function | ||
ElasticsearchViewsQuery:: |
public | function | Retrieves the index associated with this search. | |
ElasticsearchViewsQuery:: |
public | function | Retrieves the logger to use for log messages. | |
ElasticsearchViewsQuery:: |
public | function | Returns the Search API query object used by this Views query. | |
ElasticsearchViewsQuery:: |
public | function | ||
ElasticsearchViewsQuery:: |
public | function |
Initialize the plugin. Overrides PluginBase:: |
|
ElasticsearchViewsQuery:: |
public | function | Sets the entity type manager service. | |
ElasticsearchViewsQuery:: |
public | function | Sets the logger to use for log messages. | |
ElasticsearchViewsQuery:: |
public | function | Checks whether this query should be aborted. | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
public | property | Plugins's definition | |
PluginBase:: |
public | property | The display object this plugin is for. | |
PluginBase:: |
public | property | Options for this plugin will be held here. | |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
protected | property | Stores the render API renderer. | 3 |
PluginBase:: |
protected | property | Denotes whether the plugin has an additional options form. | 8 |
PluginBase:: |
public | property | The top object of a view. | 1 |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Clears a plugin. Overrides ViewsPluginInterface:: |
2 |
PluginBase:: |
protected | function | Do the work to filter out stored options depending on the defined options. | |
PluginBase:: |
public | function |
Filter out stored options depending on the defined options. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public | function |
Returns an array of available token replacements. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Returns the plugin provider. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
protected | function | Returns the render API renderer. | 1 |
PluginBase:: |
public | function |
Adds elements for available core tokens to a form. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public | function |
Returns a string with any core tokens replaced. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
constant | Include entity row languages when listing languages. | ||
PluginBase:: |
constant | Include negotiated languages when listing languages. | ||
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginBase:: |
protected | function | Makes an array of languages, optionally including special languages. | |
PluginBase:: |
public | function |
Return the human readable name of the display. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public static | function |
Moves form elements into fieldsets for presentation purposes. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public static | function |
Flattens the structure of form elements. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public static | function | Returns substitutions for Views queries for languages. | |
PluginBase:: |
protected | function | Fills up the options of the plugin with defaults. | |
PluginBase:: |
public | function |
Provide a full list of possible theme templates used by this style. Overrides ViewsPluginInterface:: |
1 |
PluginBase:: |
public static | function |
Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface:: |
6 |
PluginBase:: |
public | function |
Unpack options over our existing defaults, drilling down into arrays
so that defaults don't get totally blown away. Overrides ViewsPluginInterface:: |
|
PluginBase:: |
public | function |
Returns the usesOptions property. Overrides ViewsPluginInterface:: |
8 |
PluginBase:: |
public | function |
Validate that the plugin is correct and can be saved. Overrides ViewsPluginInterface:: |
6 |
PluginBase:: |
protected | function | Replaces Views' tokens in a given string. The resulting string will be sanitized with Xss::filterAdmin. | 1 |
PluginBase:: |
constant | Query string to indicate the site default language. | ||
PluginBase:: |
public | function |
Constructs a PluginBase object. Overrides PluginBase:: |
|
QueryPluginBase:: |
public | property | A pager plugin that should be provided by the display. | |
QueryPluginBase:: |
public | function | Add a signature to the query, if such a thing is feasible. | 1 |
QueryPluginBase:: |
public | function | Get aggregation info for group by queries. | 1 |
QueryPluginBase:: |
public | function |
The cache contexts associated with this object. Overrides CacheableDependencyInterface:: |
|
QueryPluginBase:: |
public | function |
The maximum age for which this object may be cached. Overrides CacheableDependencyInterface:: |
1 |
QueryPluginBase:: |
public | function |
The cache tags associated with this object. Overrides CacheableDependencyInterface:: |
1 |
QueryPluginBase:: |
public | function | Returns a Unix timestamp to database native timestamp expression. | 1 |
QueryPluginBase:: |
public | function | Creates cross-database date formatting. | 1 |
QueryPluginBase:: |
public | function | Returns an array of all tables from the query that map to an entity type. | |
QueryPluginBase:: |
public | function | Returns the limit of the query. | |
QueryPluginBase:: |
public | function | Get the timezone offset in seconds. | |
QueryPluginBase:: |
public | function | Loads all entities contained in the passed-in $results. . If the entity belongs to the base table, then it gets stored in $result->_entity. Otherwise, it gets stored in $result->_relationship_entities[$relationship_id]; | 1 |
QueryPluginBase:: |
public | function |
Generate a query and a countquery from all of the information supplied
to the object. Overrides PluginBase:: |
1 |
QueryPluginBase:: |
public | function | Applies a timezone offset to the given field. | 2 |
QueryPluginBase:: |
public | function | Control how all WHERE and HAVING groups are put together. | |
QueryPluginBase:: |
public | function | Set a LIMIT on the query, specifying a maximum number of results. | |
QueryPluginBase:: |
public | function | Set an OFFSET on the query, specifying a number of results to skip | |
QueryPluginBase:: |
public | function | Set the database to the current user timezone. | 1 |
QueryPluginBase:: |
public | function | Create a new grouping for the WHERE or HAVING clause. | |
QueryPluginBase:: |
public | function |
Handle any special handling on the validate form. Overrides PluginBase:: |
1 |
QueryPluginBase:: |
public | function |
Returns the summary of the settings in the display. Overrides PluginBase:: |
|
QueryPluginBase:: |
public | function |
Validate the options form. Overrides PluginBase:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
TrustedCallbackInterface:: |
constant | Untrusted callbacks throw exceptions. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger silenced E_USER_DEPRECATION errors. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger E_USER_WARNING errors. |