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

DetailView::init()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 12
ccs 0
cts 10
cp 0
rs 9.4285
cc 3
eloc 6
nc 3
nop 0
crap 12
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