public function LicenseTypeInterface::grantLicense in Commerce License 8.2
Reacts to the license being activated.
The license's privileges should be granted to its user. This is called during preSave(), so values may be set on the license entity.
Parameters
\Drupal\commerce_license\Entity\LicenseInterface $license: The license entity.
2 methods override LicenseTypeInterface::grantLicense()
- Role::grantLicense in src/
Plugin/ Commerce/ LicenseType/ Role.php - Reacts to the license being activated.
- TestLicenseBase::grantLicense in tests/
modules/ commerce_license_test/ src/ Plugin/ Commerce/ LicenseType/ TestLicenseBase.php - Reacts to the license being activated.
File
- src/
Plugin/ Commerce/ LicenseType/ LicenseTypeInterface.php, line 91
Class
- LicenseTypeInterface
- Defines the interface for license types.
Namespace
Drupal\commerce_license\Plugin\Commerce\LicenseTypeCode
public function grantLicense(LicenseInterface $license);