1 | <?php |
||
17 | class PayButtonComment extends Widget |
||
18 | { |
||
19 | /** |
||
20 | * @var Event |
||
21 | */ |
||
22 | protected $event; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | public $commentViews = []; |
||
28 | |||
29 | /** |
||
30 | * PayButtonCommentHandler constructor. |
||
31 | * @param Event $event The original event, triggered by [[hiqdev\yii2\merchant\widgets\PayButton]] |
||
32 | * @param array $config |
||
33 | */ |
||
34 | public function __construct(Event $event, $config = []) |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function init() |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function run() |
||
58 | |||
59 | /** |
||
60 | * Array of default comment views. |
||
61 | * @return array |
||
62 | */ |
||
63 | protected function getDefaultCommentViews() |
||
70 | |||
71 | /** |
||
72 | * Returns the view name for the specified $merchant. |
||
73 | * @param string $merchant |
||
74 | * @return string|null |
||
75 | * @see commentViews |
||
76 | */ |
||
77 | public function getCommentView($merchant) |
||
87 | |||
88 | /** |
||
89 | * Method renders comment from the view, specified in. |
||
90 | * @return string |
||
91 | */ |
||
92 | protected function renderComment() |
||
106 | |||
107 | /** |
||
108 | * Method provides the merchant name. |
||
109 | * @return string |
||
110 | */ |
||
111 | protected function getMerchantName() |
||
115 | |||
116 | /** |
||
117 | * @return string the view path that may be prefixed to a relative view name |
||
118 | */ |
||
119 | public function getViewPath() |
||
123 | |||
124 | /** |
||
125 | * @return PayButton |
||
126 | */ |
||
127 | public function getPayButton() |
||
131 | } |
||
132 |