public function OrderPaid::extractEntityFromEvent in Commerce Email 8
Extracts the entity from the given event.
Parameters
\Symfony\Component\EventDispatcher\Event $event: The event.
Return value
\Drupal\Core\Entity\ContentEntityInterface The extracted entity.
Overrides EmailEventInterface::extractEntityFromEvent
File
- src/
Plugin/ Commerce/ EmailEvent/ OrderPaid.php, line 23
Class
- OrderPaid
- Provides the OrderPaid email event.
Namespace
Drupal\commerce_email\Plugin\Commerce\EmailEventCode
public function extractEntityFromEvent(Event $event) {
assert($event instanceof OrderEvent);
return $event
->getOrder();
}