public function WebformSubmissionField::query in Webform Views Integration 8.5
Called to add the field to a query.
Overrides FieldPluginBase::query
File
- src/
Plugin/ views/ field/ WebformSubmissionField.php, line 111
Class
- WebformSubmissionField
- Webform submission field.
Namespace
Drupal\webform_views\Plugin\views\fieldCode
public function query() {
parent::query();
// Webform submission might have multiple values stored for the webform
// element we are operating on. Let's make sure we are not introducing
// duplicate rows in the resultset by enforcing just the first delta.
if (!empty($this->query
->getTableInfo($this->tableAlias)['join']->extra)) {
$this->query
->getTableInfo($this->tableAlias)['join']->extra[] = [
'field' => 'delta',
'value' => 0,
];
}
}