* {@inheritdoc}
*/
public function query() {
- parent::query();
-
// Add a 'where' condition if needed.
if (!empty($this->definition['extra'])) {
$bundles = [];
$bundles[] = $extra['value'];
}
}
- $this->definition['join_extra'][] = [
- 'field' => 'bundle',
- 'operator' => 'IN',
- 'value' => [$bundles],
- ];
+ if (count($bundles) > 0) {
+ $this->definition['join_extra'][] = [
+ 'field' => 'bundle',
+ 'value' => $bundles,
+ ];
+ }
}
+
+ // Now - let's build the query.
+ parent::query();
}
}