Completed
Push — master ( 19cc7f...b4d7c9 )
by Klochok
02:48
created

FancyPanel::endBody()   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 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Theme Manager for Yii2
4
 *
5
 * @link      https://github.com/hiqdev/yii2-thememanager
6
 * @package   yii2-thememanager
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\thememanager\widgets;
12
13
use hiqdev\php\collection\ArrayHelper;
14
use yii\base\Widget;
15
16
class FancyPanel extends Widget
17
{
18
    public $panelClass = 'contactmethod';
19
20
    /**
21
     * Example: darkgray|blue|green|purple.
22
     *
23
     * @var string
24
     */
25
    public $color = 'darkgray';
26
27
    public $title;
28
29
    public $content;
30
31
    public function init()
32
    {
33
        ob_start();
34
        ob_implicit_flush(false);
35
    }
36
37
    public function run()
38
    {
39
        $this->content = ob_get_clean();
40
41
        return $this->render('FancyPanel', ArrayHelper::toArray($this));
42
    }
43
}
44