function commerce_payment_update_8204 in Commerce Core 8.2
Add the event handler to the payment entity type.
File
- modules/
payment/ commerce_payment.install, line 96 - Install, update and uninstall functions for the commerce_payment module.
Code
function commerce_payment_update_8204() {
$entity_definition_update = \Drupal::entityDefinitionUpdateManager();
$entity_type = $entity_definition_update
->getEntityType('commerce_payment');
$entity_type
->setHandlerClass('event', PaymentEvent::class);
$entity_definition_update
->updateEntityType($entity_type);
}