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

FancyPanel   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 28
ccs 0
cts 10
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 5 1
A run() 0 6 1
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