Open alfredbez opened 5 years ago
It would be nice if the export can generate only kind of a diff from the default-values for each shop.
Here's example:
$default = [ 'GeneralShopSettings' => [ 'setting1' => true, 'setting2' => false, 'setting3' => false, 'aModules' => [ 'OxidEsales\Eshop\Application\Model\Article' => [ 'Vendor\Modulename1\Model\Article', 'Vendor\Modulename2\Model\Article', 'Vendor\Modulename3\Model\Article', ], ], ], ]; $shop1 = [ 'GeneralShopSettings' => [ 'setting1' => true, 'setting2' => true, 'setting4' => true, 'aModules' => [ 'OxidEsales\Eshop\Application\Model\Article' => [ 'Vendor\Modulename1\Model\Article', 'Vendor\Modulename3\Model\Article', ], ], ], ]; $shop2 = [ 'GeneralShopSettings' => [ 'setting1' => true, 'setting2' => true, 'setting4' => true, 'aModules' => [ 'OxidEsales\Eshop\Application\Model\Article' => [ 'Vendor\Modulename1\Model\Article', 'Vendor\Modulename2\Model\Article', 'Vendor\Modulename3\Model\Article', ], ], ], ];
expected result:
$cleanedShop1 = [ 'GeneralShopSettings' => [ 'setting2' => true, 'setting4' => true, 'aModules' => [ 'OxidEsales\Eshop\Application\Model\Article' => [ 'Vendor\Modulename1\Model\Article', 'Vendor\Modulename3\Model\Article', ], ], ], ]; $cleanedShop2 = [ 'GeneralShopSettings' => [ 'setting2' => true, 'setting4' => true, ], ]
We can hook into \OxidProfessionalServices\ModulesConfig\Core\ConfigExport::writeDataToFileSeperatedByShop and call a cleanup function before we call writeDataToFile.
\OxidProfessionalServices\ModulesConfig\Core\ConfigExport::writeDataToFileSeperatedByShop
writeDataToFile
What do you think?
It would be nice if the export can generate only kind of a diff from the default-values for each shop.
Here's example:
expected result:
We can hook into
\OxidProfessionalServices\ModulesConfig\Core\ConfigExport::writeDataToFileSeperatedByShop
and call a cleanup function before we callwriteDataToFile
.What do you think?