function RowPluginBase::query

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/row/RowPluginBase.php \Drupal\views\Plugin\views\row\RowPluginBase::query()
  2. 8.9.x core/modules/views/src/Plugin/views/row/RowPluginBase.php \Drupal\views\Plugin\views\row\RowPluginBase::query()
  3. 11.x core/modules/views/src/Plugin/views/row/RowPluginBase.php \Drupal\views\Plugin\views\row\RowPluginBase::query()

Overrides PluginBase::query

2 methods override RowPluginBase::query()
DataEntityRow::query in core/modules/rest/src/Plugin/views/row/DataEntityRow.php
Add anything to the query that we might need to.
EntityRow::query in core/modules/views/src/Plugin/views/row/EntityRow.php
Add anything to the query that we might need to.

File

core/modules/views/src/Plugin/views/row/RowPluginBase.php, line 149

Class

RowPluginBase
Base class for Views row plugins.

Namespace

Drupal\views\Plugin\views\row

Code

public function query() {
    if (isset($this->base_table)) {
        if (isset($this->options['relationship']) && isset($this->view->relationship[$this->options['relationship']])) {
            $relationship = $this->view->relationship[$this->options['relationship']];
            $this->field_alias = $this->view->query
                ->addField($relationship->alias, $this->base_field);
        }
        else {
            $this->field_alias = $this->view->query
                ->addField($this->base_table, $this->base_field);
        }
    }
}

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