You are here

function Nid::title_query in Views (for Drupal 7) 8.3

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

Overrides Numeric::title_query

File

lib/Views/node/Plugin/views/argument/Nid.php, line 26
Definition of Views\node\Plugin\views\argument\Nid.

Class

Nid
Argument handler to accept a node id.

Namespace

Views\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;
}