You are here

public function MemberCountBlock::__construct in Organic groups 8

Constructs a MemberCountBlock object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

string $plugin_definition: The plugin implementation definition.

\Drupal\og\OgContextInterface $og_context: The OG context provider.

\Drupal\og\MembershipManagerInterface $membership_manager: The membership manager.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/MemberCountBlock.php, line 59

Class

MemberCountBlock
Provides a block that shows the number of members in the current group.

Namespace

Drupal\og\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, OgContextInterface $og_context, MembershipManagerInterface $membership_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->ogContext = $og_context;
  $this->membershipManager = $membership_manager;
}