public function Vid::titleQuery in Drupal 10
Same name and namespace in other branches
- 8 core/modules/node/src/Plugin/views/argument/Vid.php \Drupal\node\Plugin\views\argument\Vid::titleQuery()
- 9 core/modules/node/src/Plugin/views/argument/Vid.php \Drupal\node\Plugin\views\argument\Vid::titleQuery()
Override the behavior of title(). Get the title of the revision.
Overrides NumericArgument::titleQuery
File
- core/
modules/ node/ src/ Plugin/ views/ argument/ Vid.php, line 55
Class
- Vid
- Argument handler to accept a node revision id.
Namespace
Drupal\node\Plugin\views\argumentCode
public function titleQuery() {
$titles = [];
$results = $this->nodeStorage
->getAggregateQuery()
->accessCheck(FALSE)
->allRevisions()
->groupBy('title')
->condition('vid', $this->value, 'IN')
->execute();
foreach ($results as $result) {
$titles[] = $result['title'];
}
return $titles;
}