You are here

public function Populate::__construct in Prepopulate 8.2

Same name in this branch
  1. 8.2 src/Populate.php \Drupal\prepopulate\Populate::__construct()
  2. 8.2 modules/og_prepopulate/src/Populate.php \Drupal\og_prepopulate\Populate::__construct()

Populate constructor.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $request: The request.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

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

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

Overrides Populate::__construct

File

modules/og_prepopulate/src/Populate.php, line 38

Class

Populate
Service to populate og audience fields from URL.

Namespace

Drupal\og_prepopulate

Code

public function __construct(RequestStack $request, EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $module_handler, AccountProxyInterface $current_user) {
  $populator = parent::__construct($request, $entity_type_manager, $module_handler);
  $this->currentUser = $current_user;
  return $populator;
}