1 | <?php |
||
17 | class ColoredBalance extends Widget |
||
18 | { |
||
19 | public $model; |
||
20 | |||
21 | public $attribute = 'balance'; |
||
22 | |||
23 | public $nameAttribute = 'balance'; |
||
24 | |||
25 | public $url; |
||
26 | |||
27 | /** |
||
28 | * @var bool|string Whether to compare [[attribute]] with another attribute to change the display colors |
||
29 | * - boolean false - do not compare |
||
30 | * - string - name of attribute to compare with |
||
31 | */ |
||
32 | public $compare = false; |
||
33 | |||
34 | public $colors = []; |
||
35 | |||
36 | public $urlCallback; |
||
37 | |||
38 | public function getColor($type) |
||
42 | |||
43 | public function run() |
||
62 | } |
||
63 |