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