You are here

public function IdArgumentBase::titleQuery in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_entity/src/Plugin/views/argument/IdArgumentBase.php \Drupal\bibcite_entity\Plugin\views\argument\IdArgumentBase::titleQuery()

Override the behavior of titleQuery(). Get the title of the entity.

Overrides NumericArgument::titleQuery

File

modules/bibcite_entity/src/Plugin/views/argument/IdArgumentBase.php, line 40

Class

IdArgumentBase
Class IdArgumentBase.

Namespace

Drupal\bibcite_entity\Plugin\views\argument

Code

public function titleQuery() {
  $titles = [];
  $entities = $this->storage
    ->loadMultiple($this->value);
  foreach ($entities as $entity) {
    $titles[] = $entity
      ->label();
  }
  return $titles;
}