| 1 | <?php |
||
| 7 | trait HtmlAttributes |
||
| 8 | { |
||
| 9 | /** @var \Spatie\HtmlElement\Attributes */ |
||
| 10 | protected $htmlAttributes; |
||
| 11 | |||
| 12 | protected function initializeHtmlAttributes() |
||
| 13 | { |
||
| 14 | $this->htmlAttributes = new Attributes(); |
||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param string $attribute |
||
| 19 | * @param string $value |
||
| 20 | * |
||
| 21 | * @return $this |
||
| 22 | */ |
||
| 23 | public function setAttribute(string $attribute, string $value = '') |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $class |
||
| 32 | * |
||
| 33 | * @return $this |
||
| 34 | */ |
||
| 35 | public function addClass(string $class) |
||
| 41 | } |
||
| 42 |