public function WebformEntityReferenceManager::__construct in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformEntityReferenceManager.php \Drupal\webform\WebformEntityReferenceManager::__construct()
Constructs a WebformEntityReferenceManager object.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
\Drupal\user\UserDataInterface $user_data: The user data service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler class to use for loading includes.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
File
- src/
WebformEntityReferenceManager.php, line 90
Class
- WebformEntityReferenceManager
- Webform entity reference (field) manager.
Namespace
Drupal\webformCode
public function __construct(RouteMatchInterface $route_match, AccountInterface $current_user, UserDataInterface $user_data, ModuleHandlerInterface $module_handler = NULL, EntityTypeManagerInterface $entity_type_manager = NULL) {
$this->routeMatch = $route_match;
$this->currentUser = $current_user;
$this->userData = $user_data;
$this->moduleHandler = $module_handler ?: \Drupal::moduleHandler();
$this->entityTypeManager = $entity_type_manager ?: \Drupal::entityTypeManager();
}