You are here

public function GroupIdFromUrl::getArgument in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/views/argument_default/GroupIdFromUrl.php \Drupal\group\Plugin\views\argument_default\GroupIdFromUrl::getArgument()

Return the default argument.

This needs to be overridden by every default argument handler to properly do what is needed.

Overrides ArgumentDefaultPluginBase::getArgument

File

src/Plugin/views/argument_default/GroupIdFromUrl.php, line 63

Class

GroupIdFromUrl
Default argument plugin to extract a group ID.

Namespace

Drupal\group\Plugin\views\argument_default

Code

public function getArgument() {
  if (!empty($this->group) && ($id = $this->group
    ->id())) {
    return $id;
  }
}