public function File::grantLicense in Commerce File 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
File
- src/
Plugin/ Commerce/ LicenseType/ File.php, line 120
Class
- File
- The file license type.
Namespace
Drupal\commerce_file\Plugin\Commerce\LicenseTypeCode
public function grantLicense(LicenseInterface $license) {
// Clear the download log in order to reset download limits.
$this->downloadLogger
->clear($license);
}