function FieldPluginBase::query

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::query()
  2. 8.9.x core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::query()
  3. 10 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
19 methods override FieldPluginBase::query()
BulkForm::query in core/modules/views/src/Plugin/views/field/BulkForm.php
ContextualLinks::query in core/modules/contextual/src/Plugin/views/field/ContextualLinks.php
Counter::query in core/modules/views/src/Plugin/views/field/Counter.php
Custom::query in core/modules/views/src/Plugin/views/field/Custom.php
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 169

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.