1 | <?php |
||
16 | class UserProfile extends \yii\db\ActiveRecord |
||
17 | { |
||
18 | 15 | public function __construct($config = []) |
|
23 | |||
24 | /** |
||
25 | * @inheritdoc |
||
26 | */ |
||
27 | 47 | public static function tableName() |
|
31 | |||
32 | /** |
||
33 | * @inheritdoc |
||
34 | */ |
||
35 | 1 | public function rules() |
|
36 | { |
||
37 | return [ |
||
38 | [ |
||
39 | 1 | ['birth_day', 'photo'], 'safe', |
|
40 | ], |
||
41 | |||
42 | ['birth_day', 'date', 'format' => 'php:Y-m-d'], |
||
43 | |||
44 | ['full_name', 'string', 'max' => 40], |
||
45 | ]; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @inheritdoc |
||
50 | */ |
||
51 | 1 | public function attributeLabels() |
|
60 | |||
61 | /** |
||
62 | * @return \yii\db\ActiveQuery |
||
63 | */ |
||
64 | 1 | public function getUser() |
|
68 | |||
69 | public function getFiles($callable = null) |
||
75 | } |
||
76 |