Collection   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
1
<?php
2
namespace samsoncms\app\security;
3
4
use samsonframework\core\RenderInterface;
5
use samsonframework\orm\QueryInterface;
6
use samsonframework\pager\PagerInterface;
7
use samsoncms\field\Generic;
8
use samsoncms\field\Control;
9
10
/**
11
 * Collection of SamsonCMS users
12
 * @package samsoncms\app\user
13
 */
14
class Collection extends \samsoncms\Collection
15
{
16
    /**
17
     * Overload default constructor
18
     * @param RenderInterface $renderer View renderer
19
     * @param QueryInterface $query Database query
20
     * @param PagerInterface $pager Paging
21
     */
22
    public function __construct(RenderInterface $renderer, QueryInterface $query, PagerInterface $pager)
23
    {
24
        // Fill collection fields
25
        $this->fields = array(
26
            new Generic('GroupID', '#', 0, 'id', false),
27
            new Generic('Name', t('Название группы', true), 0, 'group_name', true),
0 ignored issues
show
Deprecated Code introduced by
The function t() has been deprecated with message: Should be used as $this->system->getContainer()->geti18n()->translate()|plural()

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
28
            new Generic('Active', t('Активный', true), 11, 'publish'),
0 ignored issues
show
Deprecated Code introduced by
The function t() has been deprecated with message: Should be used as $this->system->getContainer()->geti18n()->translate()|plural()

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
29
            new Control(),
30
        );
31
32
        // Call parent
33
        parent::__construct($renderer, $query, $pager);
34
35
        // Fill collection on creation
36
        $this->fill();
37
    }
38
}
39