1 | <?php |
||
16 | class Stack |
||
17 | { |
||
18 | |||
19 | /** @var string */ |
||
20 | public static $defaultTag = 'span'; |
||
21 | |||
22 | /** @var string */ |
||
23 | private $tag; |
||
24 | |||
25 | /** @var array */ |
||
26 | private $options = []; |
||
27 | |||
28 | /** @var Icon */ |
||
29 | private $icon_front; |
||
30 | |||
31 | /** @var Icon */ |
||
32 | private $icon_back; |
||
33 | |||
34 | /** |
||
35 | * @param array $options |
||
36 | */ |
||
37 | 2 | public function __construct($options = []) |
|
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | 1 | public function __toString() |
|
51 | |||
52 | /** |
||
53 | * @param string|Icon $icon |
||
54 | * @param array $options |
||
55 | * @return self |
||
56 | */ |
||
57 | 1 | public function icon($icon, $options = []) |
|
67 | |||
68 | /** |
||
69 | * @param string|Icon $icon |
||
70 | * @param array $options |
||
71 | * @return self |
||
72 | */ |
||
73 | 1 | public function on($icon, $options = []) |
|
83 | |||
84 | /** |
||
85 | * Change html tag. |
||
86 | * @param string $tag |
||
87 | * @return static |
||
88 | * @throws \yii\base\InvalidParamException |
||
89 | */ |
||
90 | 1 | public function tag($tag) |
|
96 | |||
97 | /** |
||
98 | * @param string|null $tag |
||
99 | * @param array $options |
||
100 | * @return string |
||
101 | * @throws \yii\base\InvalidConfigException |
||
102 | */ |
||
103 | 1 | public function render($tag = null, $options = []) |
|
125 | } |