You are here

public function Fid::titleQuery in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/file/src/Plugin/views/argument/Fid.php \Drupal\file\Plugin\views\argument\Fid::titleQuery()
  2. 8 core/modules/aggregator/src/Plugin/views/argument/Fid.php \Drupal\aggregator\Plugin\views\argument\Fid::titleQuery()
Same name and namespace in other branches
  1. 8.0 core/modules/aggregator/src/Plugin/views/argument/Fid.php \Drupal\aggregator\Plugin\views\argument\Fid::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/Fid.php, line 57
Contains \Drupal\aggregator\Plugin\views\argument\Fid.

Class

Fid
Argument handler to accept an aggregator feed id.

Namespace

Drupal\aggregator\Plugin\views\argument

Code

public function titleQuery() {
  $titles = array();
  $feeds = $this->entityManager
    ->getStorage('aggregator_feed')
    ->loadMultiple($this->value);
  foreach ($feeds as $feed) {
    $titles[] = $feed
      ->label();
  }
  return $titles;
}