You are here

public function FieldPluginBase::query in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::query()

Called to add the field to a query.

Overrides HandlerBase::query

1 call to FieldPluginBase::query()
HistoryUserTimestamp::query in core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
Called to add the field to a query.
20 methods override FieldPluginBase::query()
BulkForm::query in core/modules/views/src/Plugin/views/field/BulkForm.php
Called to add the field to a query.
ContextualLinks::query in core/modules/contextual/src/Plugin/views/field/ContextualLinks.php
Called to add the field to a query.
Counter::query in core/modules/views/src/Plugin/views/field/Counter.php
Called to add the field to a query.
Custom::query in core/modules/views/src/Plugin/views/field/Custom.php
Called to add the field to a query.
EntityField::query in core/modules/views/src/Plugin/views/field/EntityField.php
Called to add the field to a query.

... See full list

File

core/modules/views/src/Plugin/views/field/FieldPluginBase.php, line 142

Class

FieldPluginBase
Base class for views fields.

Namespace

Drupal\views\Plugin\views\field

Code

public function query() {
  $this
    ->ensureMyTable();

  // Add the field.
  $params = $this->options['group_type'] != 'group' ? [
    'function' => $this->options['group_type'],
  ] : [];
  $this->field_alias = $this->query
    ->addField($this->tableAlias, $this->realField, NULL, $params);
  $this
    ->addAdditionalFields();
}