You are here

public function LicenseAvailabilityCheckerExistingRights::__construct in Commerce License 8.2

Constructs a new LicenseAvailabilityCheckerExistingRights object.

Parameters

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

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

File

src/LicenseAvailabilityCheckerExistingRights.php, line 53

Class

LicenseAvailabilityCheckerExistingRights
Prevents purchase of a license that grants rights the user already has.

Namespace

Drupal\commerce_license

Code

public function __construct(AccountProxyInterface $current_user, EntityTypeManagerInterface $entity_type_manager) {
  $this->currentUser = $current_user;
  $this->entityTypeManager = $entity_type_manager;
}