HubRepresentations   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 24
c 1
b 0
f 0
dl 0
loc 29
ccs 0
cts 27
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A fillRepresentations() 0 27 1
1
<?php
2
/**
3
 * Server module for HiPanel
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-server
6
 * @package   hipanel-module-server
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\server\grid;
12
13
use hiqdev\higrid\representations\RepresentationCollection;
14
use Yii;
15
16
class HubRepresentations extends RepresentationCollection
17
{
18
    protected function fillRepresentations()
19
    {
20
        $this->representations = array_filter([
21
            'common' => [
22
                'label' => Yii::t('hipanel', 'common'),
23
                'columns' => [
24
                    'checkbox',
25
                    'actions',
26
                    'switch',
27
                    'inn',
28
                    'model',
29
                    'type',
30
                    'ip',
31
                    'mac',
32
                    'order_no',
33
                ],
34
            ],
35
            'sale' => [
36
                'label' => Yii::t('hipanel:server:hub', 'sale'),
37
                'columns' => [
38
                    'checkbox',
39
                    'actions',
40
                    'switch',
41
                    'buyer',
42
                    'tariff',
43
                    'model',
44
                    'type',
45
                ],
46
            ],
47
        ]);
48
    }
49
}
50