1 | <?php |
||
18 | abstract class BaseWidget extends Widget |
||
19 | { |
||
20 | use ModuleTrait; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | public $entity; |
||
26 | |||
27 | /** |
||
28 | * @var null|\yii\db\ActiveRecord |
||
29 | */ |
||
30 | public $model; |
||
31 | |||
32 | /** |
||
33 | * @var null|integer; |
||
34 | */ |
||
35 | public $targetId; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | public $voteUrl; |
||
41 | |||
42 | /** |
||
43 | * @var null|\hauntd\vote\models\VoteAggregate |
||
44 | */ |
||
45 | public $aggregateModel; |
||
46 | |||
47 | /** |
||
48 | * @var null|integer |
||
49 | */ |
||
50 | public $userValue = null; |
||
51 | |||
52 | /** |
||
53 | * @var string |
||
54 | */ |
||
55 | public $jsBeforeVote; |
||
56 | |||
57 | /** |
||
58 | * @var string |
||
59 | */ |
||
60 | public $jsAfterVote; |
||
61 | |||
62 | /** |
||
63 | * @var string |
||
64 | */ |
||
65 | public $jsCodeKey = 'vote'; |
||
66 | |||
67 | /** |
||
68 | * @var string |
||
69 | */ |
||
70 | public $jsErrorVote; |
||
71 | |||
72 | /** |
||
73 | * @var string |
||
74 | */ |
||
75 | public $jsShowMessage; |
||
76 | |||
77 | /** |
||
78 | * @var string |
||
79 | */ |
||
80 | public $jsChangeCounters; |
||
81 | |||
82 | /** |
||
83 | * @var array |
||
84 | */ |
||
85 | public $options = []; |
||
86 | |||
87 | /** |
||
88 | * @var string |
||
89 | */ |
||
90 | public $viewFile = 'vote'; |
||
91 | |||
92 | /** |
||
93 | * @var array |
||
94 | */ |
||
95 | public $viewParams = []; |
||
96 | |||
97 | /** |
||
98 | * @return string |
||
99 | */ |
||
100 | public function getSelector() |
||
105 | |||
106 | /** |
||
107 | * @inheritdoc |
||
108 | * @throws \yii\base\InvalidConfigException |
||
109 | */ |
||
110 | public function init() |
||
124 | |||
125 | /** |
||
126 | * Initialize widget with default options. |
||
127 | * |
||
128 | * @throws \yii\base\InvalidConfigException |
||
129 | */ |
||
130 | public function initDefaults() |
||
145 | |||
146 | /** |
||
147 | * Registers jQuery handler. |
||
148 | */ |
||
149 | protected function registerJs() |
||
170 | |||
171 | /** |
||
172 | * @param array $params |
||
173 | * @return array |
||
174 | */ |
||
175 | protected function getViewParams(array $params) |
||
179 | } |
||
180 |