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