public function OrderEventSubscriber::onOrderAssign in Commerce Core 8.2
Creates a log when an order is assigned.
Parameters
\Drupal\commerce_order\Event\OrderAssignEvent $event: The order assign event.
File
- modules/
log/ src/ EventSubscriber/ OrderEventSubscriber.php, line 45
Class
Namespace
Drupal\commerce_log\EventSubscriberCode
public function onOrderAssign(OrderAssignEvent $event) {
$order = $event
->getOrder();
$this->logStorage
->generate($order, 'order_assigned', [
'user' => $event
->getCustomer()
->getDisplayName(),
])
->save();
}