Skip to content
Snippets Groups Projects

Issue #3318706: Drupal 9 Deprecated Code Report

7 files
+ 21
15
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -82,7 +82,7 @@ abstract class EntitySyncBase extends PluginBase implements EntitySyncInterface,
$this->map = $map;
$this->syncManager = $sync_manager;
$this->eventDispatcher = $event_dispatcher;
return parent::__construct($configuration, $plugin_id, $plugin_definition);
parent::__construct($configuration, $plugin_id, $plugin_definition);
}
/**
@@ -131,12 +131,12 @@ abstract class EntitySyncBase extends PluginBase implements EntitySyncInterface,
// Re-create object.
$odoo_id = $this->odoo->create($this->getOdooModel(), $this->getOdooFields($entity));
}
$this->eventDispatcher->dispatch(OdooExportEvent::WRITE, new OdooExportEvent($entity, $this->getOdooModel(), $this->getExportType(), $odoo_id));
$this->eventDispatcher->dispatch(new OdooExportEvent($entity, $this->getOdooModel(), $this->getExportType(), $odoo_id), OdooExportEvent::WRITE);
}
else {
// Create new Odoo object.
$odoo_id = $this->odoo->create($this->getOdooModel(), $this->getOdooFields($entity));
$this->eventDispatcher->dispatch(OdooExportEvent::CREATE, new OdooExportEvent($entity, $this->getOdooModel(), $this->getExportType(), $odoo_id));
$this->eventDispatcher->dispatch(new OdooExportEvent($entity, $this->getOdooModel(), $this->getExportType(), $odoo_id), OdooExportEvent::CREATE);
}
return $odoo_id;
}
@@ -159,7 +159,7 @@ abstract class EntitySyncBase extends PluginBase implements EntitySyncInterface,
}
$this->odoo->unlink($this->getOdooModel(), [$odoo_id]);
$this->eventDispatcher->dispatch(OdooExportEvent::DELETE_REQUEST, new OdooExportEvent($entity, $this->getOdooModel(), $this->getExportType(), $odoo_id));
$this->eventDispatcher->dispatch(new OdooExportEvent($entity, $this->getOdooModel(), $this->getExportType(), $odoo_id), OdooExportEvent::DELETE_REQUEST);
}
catch (FaultException $e) {
throw new ServerErrorException($this->getEntityType(), $this->getOdooModel(), $this->getExportType(), $entity->id(), $e);
Loading