1 | <?php |
||
31 | class Module extends \yii\base\Module |
||
32 | { |
||
33 | /** |
||
34 | * @var array array of the options that will be passed to [[set]] |
||
35 | */ |
||
36 | public $shoppingCartOptions = []; |
||
37 | |||
38 | /** |
||
39 | * Cart component ID. |
||
40 | */ |
||
41 | const CART_COMPONENT_ID = 'cart'; |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | * @throws \yii\base\InvalidConfigException |
||
46 | */ |
||
47 | 5 | public function init() |
|
58 | |||
59 | /** |
||
60 | * Registers translations. |
||
61 | * @void |
||
62 | */ |
||
63 | 5 | public function registerTranslations() |
|
74 | |||
75 | /** |
||
76 | * @var string the module name |
||
77 | */ |
||
78 | public static $name = 'cart'; |
||
79 | |||
80 | /** |
||
81 | * Finds cart module. |
||
82 | * TODO think of how to find NOT by name. |
||
83 | */ |
||
84 | 1 | public static function getInstance() |
|
88 | |||
89 | /** |
||
90 | * @throws \yii\base\InvalidConfigException |
||
91 | * @return null|\yz\shoppingcart\ShoppingCart|ShoppingCart |
||
92 | */ |
||
93 | 1 | public function getCart() |
|
97 | |||
98 | 1 | public function createUrl($route = null) |
|
105 | |||
106 | /** |
||
107 | * @var string|array route to the terms of use page, suitable for Url::to(). |
||
108 | */ |
||
109 | public $termsPage; |
||
110 | |||
111 | /** |
||
112 | * @var string|array route to the order page, suitable for Url::to(). |
||
113 | */ |
||
114 | public $orderPage = ['order']; |
||
115 | |||
116 | protected $_orderButton; |
||
117 | |||
118 | 1 | public function setOrderButton($value) |
|
122 | |||
123 | 1 | public function getOrderButton() |
|
127 | |||
128 | protected $_paymentMethods; |
||
129 | |||
130 | 1 | public function setPaymentMethods($value) |
|
134 | |||
135 | 1 | public function getPaymentMethods() |
|
139 | } |
||
140 |