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