You are here

public function Iid::titleQuery in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/aggregator/src/Plugin/views/argument/Iid.php \Drupal\aggregator\Plugin\views\argument\Iid::titleQuery()

Override for specific title lookups.

Return value

array Returns all titles, if it's just one title it's an array with one entry.

Overrides NumericArgument::titleQuery

File

core/modules/aggregator/src/Plugin/views/argument/Iid.php, line 57

Class

Iid
Argument handler to accept an aggregator item id.

Namespace

Drupal\aggregator\Plugin\views\argument

Code

public function titleQuery() {
  $titles = [];
  $items = $this->entityTypeManager
    ->getStorage('aggregator_item')
    ->loadMultiple($this->value);
  foreach ($items as $feed) {
    $titles[] = $feed
      ->label();
  }
  return $titles;
}