You are here

public function GroupAddBlock::__construct in Open Social 10.1.x

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

Constructs a GroupAddBlock object.

Parameters

array $configuration: The block configuration.

string $plugin_id: The ID of the plugin.

mixed $plugin_definition: The plugin definition.

\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.

\Drupal\social_group\SocialGroupHelperService $social_group_helper: The social group helper service.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The currently active route match object.

Overrides BlockPluginTrait::__construct

File

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

Class

GroupAddBlock
Provides a 'GroupAddBlock' block.

Namespace

Drupal\social_group\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountProxyInterface $current_user, SocialGroupHelperService $social_group_helper, RouteMatchInterface $route_match) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $current_user;
  $this->socialGroupHelper = $social_group_helper;
  $this->routeMatch = $route_match;
}