Completed
Push — master ( 1a19db...c922a9 )
by Song
02:53
created

Html::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Encore\Admin\Form\Field;
4
5
use Encore\Admin\Form\Field;
6
7
class Html extends Field
8
{
9
    /**
10
     * Htmlable.
11
     *
12
     * @var string
13
     */
14
    protected $html = '';
15
16
    /**
17
     * Create a new Html instance.
18
     *
19
     * @param mixed $html
20
     */
21
    public function __construct($html)
22
    {
23
        $this->html = $html;
24
    }
25
26
    /**
27
     * Render html field.
28
     *
29
     * @return string
30
     */
31
    public function render()
32
    {
33
        return <<<EOT
34
<div class="form-group">
35
    <label  class="col-sm-2 control-label"></label>
36
    <div class="col-sm-6">
37
        $this->html
38
    </div>
39
</div>
40
EOT;
41
42
    }
43
}
44