public function query() {
$query = $this
->select('paragraphs_item', 'p')
->fields('p', [
'item_id',
'bundle',
'field_name',
'archived',
])
->fields('pr', [
'revision_id',
]);
$query
->innerJoin('paragraphs_item_revision', 'pr', static::JOIN);
// This configuration item may be set by a deriver to restrict the
// bundles retrieved.
if ($this->configuration['bundle']) {
$query
->condition('p.bundle', $this->configuration['bundle']);
}
return $query;
}