Dans App/Themes/<plugin>/<module>/Setup/Install.php
, dans la classe Install extends \Change\Plugins\ThemeInstallBase
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
protected function createOrUpdateTheme($plugin, $applicationServices, $transactionManager) { $theme = parent::createOrUpdateTheme($plugin, $applicationServices, $transactionManager); try { $transactionManager->begin(); $theme->setParentTheme($applicationServices->getThemeManager()->getByName('<plugin_module>')); $theme->save(); $transactionManager->commit(); } catch (\Exception $e) { throw $transactionManager->rollBack($e); } return $theme; } |