public function OrderPlaced::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/ OrderPlaced.php, line 23
Class
- OrderPlaced
- Provides the OrderPlaced email event.
Namespace
Drupal\commerce_email\Plugin\Commerce\EmailEventCode
public function extractEntityFromEvent(Event $event) {
assert($event instanceof WorkflowTransitionEvent);
return $event
->getEntity();
}