Debian Codegraph @

vendor/ipl/web/src/Widget/HorizontalKeyValue.php

raw
1 <?php
2
3 namespace ipl\Web\Widget;
4
5 use ipl\Html\BaseHtmlElement;
6 use ipl\Html\Html;
7
8 class HorizontalKeyValue extends BaseHtmlElement
9 {
10 protected $key;
11
12 protected $value;
13
14 protected $defaultAttributes = ['class' => 'horizontal-key-value'];
15
16 protected $tag = 'div';
17
18 public function __construct($key, $value)
19 {
20 $this->key = $key;
21 $this->value = $value;
22 }
23
24 protected function assemble()
25 {
26 $this->add([
27 Html::tag('div', ['class' => 'key'], $this->key),
28 Html::tag('div', ['class' => 'value'], $this->value)
29 ]);
30 }
31 }