Completed
Push — master ( 3c8880...e2c218 )
by Dmitry
06:42 queued 02:46
created

DetailView   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 12 3
1
<?php
2
3
/*
4
 * HiPanel core package
5
 *
6
 * @link      https://hipanel.com/
7
 * @package   hipanel-core
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2014-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hipanel\grid;
13
14
use hiqdev\thememanager\ThemeManager;
15
use Yii;
16
use yii\helpers\Html;
17
18
/**
19
 * Class DetailView.
20
 */
21
class DetailView extends \hiqdev\higrid\DetailView
22
{
23
    public function init()
24
    {
25
        parent::init();
26
27
        if (Yii::$app->has('themeManager')) {
28
            /** @var ThemeManager $themeManager */
29
            $themeManager = Yii::$app->get('themeManager');
30
            if ($themeManager->getTheme()->getSettings()->table_condensed) {
31
                Html::addCssClass($this->options, 'table-condensed');
32
            }
33
        }
34
    }
35
}
36