public function Nid::titleQuery in Drupal 8
Same name and namespace in other branches
- 9 core/modules/node/src/Plugin/views/argument/Nid.php \Drupal\node\Plugin\views\argument\Nid::titleQuery()
- 10 core/modules/node/src/Plugin/views/argument/Nid.php \Drupal\node\Plugin\views\argument\Nid::titleQuery()
Override the behavior of title(). Get the title of the node.
Overrides NumericArgument::titleQuery
File
- core/
modules/ node/ src/ Plugin/ views/ argument/ Nid.php, line 54
Class
- Nid
- Argument handler to accept a node id.
Namespace
Drupal\node\Plugin\views\argumentCode
public function titleQuery() {
$titles = [];
$nodes = $this->nodeStorage
->loadMultiple($this->value);
foreach ($nodes as $node) {
$titles[] = $node
->label();
}
return $titles;
}