public function RowPluginBase::query in Views (for Drupal 7) 8.3
Add anything to the query that we might need to.
Overrides PluginBase::query
File
- lib/
Drupal/ views/ Plugin/ views/ row/ RowPluginBase.php, line 131 - Definition of Drupal\views\Plugin\views\row\RowPluginBase.
Class
- RowPluginBase
- Default plugin to view a single row of a table. This is really just a wrapper around a theme function.
Namespace
Drupal\views\Plugin\views\rowCode
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
->add_field($relationship->alias, $this->base_field);
}
else {
$this->field_alias = $this->view->query
->add_field($this->base_table, $this->base_field);
}
}
}