You are here

public function License::getExpirationPlugin in Commerce License 8.2

Gets the expiration plugin for this license.

Return value

\Drupal\recurring_period\Plugin\RecurringPeriod\RecurringPeriodInterface The recurring_period plugin configured for this license.

Overrides LicenseInterface::getExpirationPlugin

1 call to License::getExpirationPlugin()
License::calculateExpirationTime in src/Entity/License.php
Calculate the expiration time for this license from a start time.

File

src/Entity/License.php, line 164

Class

License
Defines the License entity.

Namespace

Drupal\commerce_license\Entity

Code

public function getExpirationPlugin() {
  return $this
    ->get('expiration_type')
    ->first()
    ->getTargetInstance();
}