You are here

public function OgAccess::__construct in Organic groups 8

Constructs the OgAccess service.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\Session\AccountProxyInterface $account_proxy: The service that contains the current active user.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\og\GroupTypeManagerInterface $group_manager: The group manager.

\Drupal\og\PermissionManagerInterface $permission_manager: The permission manager.

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

\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher: The event dispatcher.

File

src/OgAccess.php, line 119

Class

OgAccess
The service that determines if users have access to groups and group content.

Namespace

Drupal\og

Code

public function __construct(ConfigFactoryInterface $config_factory, AccountProxyInterface $account_proxy, ModuleHandlerInterface $module_handler, GroupTypeManagerInterface $group_manager, PermissionManagerInterface $permission_manager, MembershipManagerInterface $membership_manager, EventDispatcherInterface $dispatcher) {
  $this->configFactory = $config_factory;
  $this->accountProxy = $account_proxy;
  $this->moduleHandler = $module_handler;
  $this->groupTypeManager = $group_manager;
  $this->permissionManager = $permission_manager;
  $this->membershipManager = $membership_manager;
  $this->dispatcher = $dispatcher;
}