-
Notifications
You must be signed in to change notification settings - Fork 0
/
activate.php
executable file
·52 lines (43 loc) · 1.73 KB
/
activate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
$pluginKey = 'skmobileapp';
$widgetService = BOL_ComponentAdminService::getInstance();
$widgetService->deleteWidget('SKADATE_CMP_MobileExperience');
$desktopWidget = $widgetService->addWidget('SKMOBILEAPP_CMP_MobileExperience', false);
$mobileWidget = $widgetService->addWidget('SKMOBILEAPP_MCMP_MobileExperience', false);
try {
$widgetService->addWidgetToPosition(
$widgetService->addWidgetToPlace($desktopWidget, BOL_ComponentAdminService::PLACE_INDEX),
BOL_ComponentService::SECTION_RIGHT
);
}
catch (Exception $e) {
OW::getLogger('skmobileapp.activate.desktop_widget_mobile_experience_index')->addEntry(json_encode($e));
}
try {
$widgetService->addWidgetToPosition(
$widgetService->addWidgetToPlace($desktopWidget, BOL_ComponentAdminService::PLACE_DASHBOARD),
BOL_ComponentService::SECTION_RIGHT
);
}
catch (Exception $e) {
OW::getLogger('skmobileapp.activate.desktop_widget_mobile_experience_dashboard')->addEntry(json_encode($e));
}
try {
$widgetService->addWidgetToPosition(
$widgetService->addWidgetToPlace($mobileWidget, BOL_MobileWidgetService::PLACE_MOBILE_INDEX),
BOL_MobileWidgetService::SECTION_MOBILE_MAIN
);
}
catch (Exception $e) {
OW::getLogger('skmobileapp.activate.mobile_widget_mobile_experience_index')->addEntry(json_encode($e));
}
try {
$widgetService->addWidgetToPosition(
$widgetService->addWidgetToPlace($mobileWidget, BOL_MobileWidgetService::PLACE_MOBILE_DASHBOARD),
BOL_MobileWidgetService::SECTION_MOBILE_MAIN
);
}
catch (Exception $e) {
OW::getLogger('skmobileapp.activate.mobile_widget_mobile_experience_dashboard')->addEntry(json_encode($e));
}
BOL_BillingService::getInstance()->activateGateway($pluginKey);