public function TestLicenseBase::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.
Overrides LicenseTypeInterface::grantLicense
3 methods override TestLicenseBase::grantLicense()
- LicenseStateChangeTest::grantLicense in tests/
modules/ commerce_license_test/ src/ Plugin/ Commerce/ LicenseType/ LicenseStateChangeTest.php - Reacts to the license being activated.
- LicenseWithField::grantLicense in tests/
modules/ commerce_license_test/ src/ Plugin/ Commerce/ LicenseType/ LicenseWithField.php - Reacts to the license being activated.
- StateChangeWithRightsCheck::grantLicense in tests/
modules/ commerce_license_test/ src/ Plugin/ Commerce/ LicenseType/ StateChangeWithRightsCheck.php - Reacts to the license being activated.
File
- tests/
modules/ commerce_license_test/ src/ Plugin/ Commerce/ LicenseType/ TestLicenseBase.php, line 23
Class
- TestLicenseBase
- Base class for test license types: implements the needed methods.
Namespace
Drupal\commerce_license_test\Plugin\Commerce\LicenseTypeCode
public function grantLicense(LicenseInterface $license) {
}