AgentsDataTable::getColumns()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Statistics\DataTables\Adminarea;
6
7
use Rinvex\Statistics\Models\Agent;
8
use Cortex\Foundation\DataTables\AbstractDataTable;
9
use Cortex\Statistics\Transformers\Adminarea\AgentTransformer;
10
11
class AgentsDataTable extends AbstractDataTable
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    protected $model = Agent::class;
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    protected $transformer = AgentTransformer::class;
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected $createButton = false;
27
28
    /**
29
     * Get columns.
30
     *
31
     * @return array
32
     */
33
    protected function getColumns(): array
34
    {
35
        return [
36
            'name' => ['title' => trans('cortex/statistics::common.name'), 'responsivePriority' => 0],
37
            'kind' => ['title' => trans('cortex/statistics::common.kind')],
38
            'family' => ['title' => trans('cortex/statistics::common.family')],
39
            'version' => ['title' => trans('cortex/statistics::common.version')],
40
            'count' => ['title' => trans('cortex/statistics::common.count')],
41
        ];
42
    }
43
}
44