-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bootstrap.php
86 lines (74 loc) · 2.03 KB
/
Bootstrap.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
class Shopware_Plugins_Frontend_Jtlconnector_Bootstrap extends Shopware_Components_Plugin_Bootstrap
{
public function getCapabilities()
{
return array(
'install' => true,
'update' => false,
'enable' => true,
);
}
public function getLabel()
{
return 'JTL Shopware Connector';
}
public function getVersion()
{
return '1.0.0';
}
public function getInfo()
{
return array(
'version' => $this->getVersion(),
'label' => $this->getLabel(),
'author' => 'JTL-Software GmbH',
'description' => '',
'support' => 'JTL-Software Forum',
'link' => 'http://forum.jtl-software.de'
);
}
public function install()
{
if (!$this->assertVersionGreaterThen('4.2.3')) {
return array(
'success' => false,
'message' => 'Das Plugin benötigt mindestens die Shopware Version 4.2.3'
);
}
$this->subscribeEvent(
'Enlight_Controller_Dispatcher_ControllerPath_Frontend_Jtlconnector',
'onGetControllerPathFrontend'
);
/*
$form = $this->Form();
$form->setElement('text', 'auth_token',
array(
'label' => 'Auth Token',
'value' => '',
'scope' => Shopware\Models\Config\Element::SCOPE_SHOP
)
);
*/
return array(
'success' => true,
'invalidateCache' => array('backend', 'proxy')
);
}
public function enable()
{
return true;
}
public function disable()
{
return true;
}
public function uninstall()
{
return true;
}
public static function onGetControllerPathFrontend(Enlight_Event_EventArgs $args)
{
return dirname(__FILE__) . '/Controllers/Frontend/Connector.php';
}
}