You are here

public function GroupId::titleQuery in Group 8

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

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

Overrides NumericArgument::titleQuery

File

src/Plugin/views/argument/GroupId.php, line 55

Class

GroupId
Argument handler to accept a group ID.

Namespace

Drupal\group\Plugin\views\argument

Code

public function titleQuery() {
  $titles = [];
  $groups = $this->groupStorage
    ->loadMultiple($this->value);
  foreach ($groups as $group) {
    $titles[] = $group
      ->label();
  }
  return $titles;
}