You are here

public function License::getPurchasedEntity in Commerce License 8.2

Gets the licensed entity that was purchased.

Return value

\Drupal\commerce\PurchasableEntityInterface The licensed entity.

Overrides LicenseInterface::getPurchasedEntity

File

src/Entity/License.php, line 278

Class

License
Defines the License entity.

Namespace

Drupal\commerce_license\Entity

Code

public function getPurchasedEntity() {
  return $this
    ->get('product_variation')->entity;
}