function Nid::title_query

Override the behavior of title(). Get the title of the node.

Overrides Numeric::title_query

File

drupal/core/modules/node/lib/Drupal/node/Plugin/views/argument/Nid.php, line 26
Definition of Drupal\node\Plugin\views\argument\Nid.

Class

Nid
Argument handler to accept a node id.

Namespace

Drupal\node\Plugin\views\argument

Code

function title_query() {
  $titles = array();
  $nodes = node_load_multiple($this->value);
  foreach ($nodes as $node) {
    $titles[] = check_plain($node
      ->label());
  }
  return $titles;
}