You are here

public function Nid::titleQuery in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 59
Contains \Drupal\node\Plugin\views\argument\Nid.

Class

Nid
Argument handler to accept a node id.

Namespace

Drupal\node\Plugin\views\argument

Code

public function titleQuery() {
  $titles = array();
  $nodes = $this->nodeStorage
    ->loadMultiple($this->value);
  foreach ($nodes as $node) {
    $titles[] = $node
      ->label();
  }
  return $titles;
}