@@ -78,22 +78,22 @@ public function import(string $yamlInput, string $format, bool $forcedSave, bool
7878 $ this ->parentRelationResolver ->resolve ($ result );
7979 try {
8080 $ result ->save (['versionNote ' => 'created by pimcore-import-export-bundle ' ]);
81- $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::CREATED , $ typeKey , $ element , $ result , null ));
81+ $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::Created , $ typeKey , $ element , $ result , null ));
8282 } catch (\Exception $ e ) {
83- $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::FAILED , $ typeKey , $ element , $ result , $ oldElement , $ e ->getMessage ()));
83+ $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::Failed , $ typeKey , $ element , $ result , $ oldElement , $ e ->getMessage ()));
8484 }
8585 } elseif ($ overwrite ) {
8686 if ($ this ->newElementHasNoValidId ($ result ) || $ this ->bothHaveSameId ($ oldElement , $ result )) {
8787 // Update existing element by new one
8888 try {
8989 $ mergeStrategy ->mergeAndSave ($ oldElement , $ result );
90- $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::UPDATED , $ typeKey , $ element , $ result , $ oldElement ));
90+ $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::Updated , $ typeKey , $ element , $ result , $ oldElement ));
9191 } catch (\Exception $ e ) {
92- $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::FAILED , $ typeKey , $ element , $ result , $ oldElement , $ e ->getMessage ()));
92+ $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::Failed , $ typeKey , $ element , $ result , $ oldElement , $ e ->getMessage ()));
9393 }
9494 } else {
9595 $ this ->dispatcher ->dispatch (new ImportEvent (
96- ImportStatus::INCONSISTENCY , $ typeKey , $ element , $ result , $ oldElement ,
96+ ImportStatus::Inconsistency , $ typeKey , $ element , $ result , $ oldElement ,
9797 <<<ERR_MESSAGE
9898 Two elements with same key (%s) and path (%s) but different IDs (new ID: %d, old ID: %d) found.
9999 This seems to be an inconsistency of your importing data. Please check your import file.
@@ -104,7 +104,7 @@ public function import(string $yamlInput, string $format, bool $forcedSave, bool
104104 }
105105 } else {
106106 // Don't overwrite existing element
107- $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::SKIPPED , $ typeKey , $ element , $ result , $ oldElement ));
107+ $ this ->dispatcher ->dispatch (new ImportEvent (ImportStatus::Skipped , $ typeKey , $ element , $ result , $ oldElement ));
108108 }
109109 }
110110 }
0 commit comments