You are here

protected function GroupAddBlock::getUrl in Open Social 10.1.x

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_group/src/Plugin/Block/GroupAddBlock.php \Drupal\social_group\Plugin\Block\GroupAddBlock::getUrl()
  2. 10.0.x modules/social_features/social_group/src/Plugin/Block/GroupAddBlock.php \Drupal\social_group\Plugin\Block\GroupAddBlock::getUrl()
  3. 10.2.x modules/social_features/social_group/src/Plugin/Block/GroupAddBlock.php \Drupal\social_group\Plugin\Block\GroupAddBlock::getUrl()

Returns the URL of the button.

Return value

\Drupal\Core\Url The URL object.

1 call to GroupAddBlock::getUrl()
GroupAddBlock::build in modules/social_features/social_group/src/Plugin/Block/GroupAddBlock.php
Builds and returns the renderable array for this block plugin.

File

modules/social_features/social_group/src/Plugin/Block/GroupAddBlock.php, line 170

Class

GroupAddBlock
Provides a 'GroupAddBlock' block.

Namespace

Drupal\social_group\Plugin\Block

Code

protected function getUrl() {
  return $this->socialGroupHelper
    ->getGroupsToAddUrl($this->currentUser) ?? Url::fromRoute('entity.group.add_page');
}