Completed
Push — master ( 0ebb43...8dfae0 )
by Klochok
05:00
created

FancyPanel::beginBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace hiqdev\thememanager\widgets;
4
5
use yii\base\Widget;
6
use yii\helpers\Html;
7
8
class FancyPanel extends Widget
9
{
10
    public $panelClass = 'contactmethod';
11
12
    /**
13
     * Example: darkgray|blue|green|purple
14
     *
15
     * @var string
16
     */
17
    public $color = 'darkgray';
18
19
    public $title;
20
21
    public function init()
22
    {
23
        print Html::beginTag('div', ['class' => $this->panelClass . ' ' . $this->color]);
24
        print Html::tag('h5', $this->title);
25
    }
26
27
    public function run()
28
    {
29
        print Html::endTag('div');
30
    }
31
32
    public function beginBody()
33
    {
34
        print Html::beginTag('p') . "\n";
35
    }
36
37
    public function endBody()
38
    {
39
        print "\n" . Html::endTag('p');
40
    }
41
}
42