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), |
|
|
|
|
28
|
|
|
new Generic('Active', t('Активный', true), 11, 'publish'), |
|
|
|
|
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
|
|
|
|
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.