|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Created by PhpStorm. |
|
4
|
|
|
* User: onysko |
|
5
|
|
|
* Date: 27.05.2015 |
|
6
|
|
|
* Time: 13:07 |
|
7
|
|
|
*/ |
|
8
|
|
|
namespace samsoncms\app\user\form\tab; |
|
9
|
|
|
|
|
10
|
|
|
use samsoncms\app\user\field\FormGroup; |
|
11
|
|
|
use samsoncms\form\field\Generic; |
|
12
|
|
|
use samsonframework\core\RenderInterface; |
|
13
|
|
|
use samsonframework\orm\QueryInterface; |
|
14
|
|
|
use samsonframework\orm\Record; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* User SamsonCMS application form entity tab |
|
18
|
|
|
* @package samsoncms\app\user\form\tab |
|
19
|
|
|
*/ |
|
20
|
|
|
class Entity extends \samsoncms\form\tab\Entity |
|
21
|
|
|
{ |
|
22
|
|
|
/** @var string Tab name or identifier */ |
|
23
|
|
|
protected $name = 'Главная'; |
|
24
|
|
|
|
|
25
|
|
|
/** @inheritdoc */ |
|
26
|
|
|
public function __construct(RenderInterface $renderer, QueryInterface $query, Record $entity) |
|
27
|
|
|
{ |
|
28
|
|
|
// Add fields |
|
29
|
|
|
$this->fields = array( |
|
|
|
|
|
|
30
|
|
|
new Generic('f_name', t('Имя', true), 0), |
|
31
|
|
|
new Generic('s_name', t('Фамилия', true), 0), |
|
32
|
|
|
new Generic('t_name', t('Отчество', true), 0), |
|
33
|
|
|
new Generic('email', t('Email', true), 0), |
|
34
|
|
|
new Generic('md5_password', t('Пароль', true), 0), |
|
35
|
|
|
new FormGroup('group_id', t('Группа', true)) |
|
36
|
|
|
); |
|
37
|
|
|
|
|
38
|
|
|
// Call parent constructor to define all class fields |
|
39
|
|
|
parent::__construct($renderer, $query, $entity); |
|
40
|
|
|
} |
|
41
|
|
|
} |
|
42
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..