File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 19
19
use Pimcore \Bundle \DataHubBundle \Controller \ConfigController ;
20
20
use Pimcore \Bundle \DataHubBundle \Migrations \PimcoreX \Version20210305134111 ;
21
21
use Pimcore \Db ;
22
+ use Pimcore \Extension \Bundle \Installer \Exception \InstallationException ;
22
23
use Pimcore \Extension \Bundle \Installer \SettingsStoreAwareInstaller ;
23
24
use Pimcore \Logger ;
24
25
use Pimcore \Model \Tool \SettingsStore ;
@@ -40,12 +41,12 @@ public function needsReloadAfterInstall(): bool
40
41
*/
41
42
public function install ()
42
43
{
43
- // create backend permission
44
- Definition::create (ConfigController::CONFIG_NAME )->setCategory (self ::DATAHUB_PERMISSION_CATEGORY )->save ();
45
- Definition::create (self ::DATAHUB_ADAPTER_PERMISSION )->setCategory (self ::DATAHUB_PERMISSION_CATEGORY )->save ();
46
- Definition::create (self ::DATAHUB_ADMIN_PERMISSION )->setCategory (self ::DATAHUB_PERMISSION_CATEGORY )->save ();
47
-
48
44
try {
45
+ // create backend permission
46
+ Definition::create (ConfigController::CONFIG_NAME )->setCategory (self ::DATAHUB_PERMISSION_CATEGORY )->save ();
47
+ Definition::create (self ::DATAHUB_ADAPTER_PERMISSION )->setCategory (self ::DATAHUB_PERMISSION_CATEGORY )->save ();
48
+ Definition::create (self ::DATAHUB_ADMIN_PERMISSION )->setCategory (self ::DATAHUB_PERMISSION_CATEGORY )->save ();
49
+
49
50
$ types = ['document ' , 'asset ' , 'object ' ];
50
51
51
52
$ db = Db::get ();
@@ -68,11 +69,10 @@ public function install()
68
69
}
69
70
} catch (\Exception $ e ) {
70
71
Logger::warn ($ e );
72
+ throw new InstallationException ($ e ->getMessage ());
71
73
}
72
74
73
75
parent ::install ();
74
-
75
- return true ;
76
76
}
77
77
78
78
/**
You can’t perform that action at this time.
0 commit comments