1 | <?php |
||
9 | class Html implements Item, Activatable, HasParentAttributes |
||
10 | { |
||
11 | use ActivatableTrait, HasParentAttributesTrait; |
||
12 | |||
13 | /** @var string */ |
||
14 | protected $html; |
||
15 | |||
16 | /** @var string|null */ |
||
17 | protected $url = null; |
||
18 | |||
19 | /** @var bool */ |
||
20 | protected $active = false; |
||
21 | |||
22 | /** @var \Spatie\Menu\Html\Attributes */ |
||
23 | protected $parentAttributes; |
||
24 | |||
25 | /** |
||
26 | * @param string $html |
||
27 | */ |
||
28 | protected function __construct(string $html) |
||
33 | |||
34 | /** |
||
35 | * Create an item containing a chunk of raw html. |
||
36 | * |
||
37 | * @param string $html |
||
38 | * |
||
39 | * @return static |
||
40 | */ |
||
41 | public static function raw(string $html) |
||
45 | |||
46 | /** |
||
47 | * Create an empty item. |
||
48 | * |
||
49 | * @return static |
||
50 | */ |
||
51 | public static function empty() |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | public function html(): string |
||
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | public function render(): string |
||
71 | } |
||
72 |