1 | <?php |
||
8 | class UserProfileForm extends \yii\base\Model |
||
9 | { |
||
10 | /** |
||
11 | * @var int |
||
12 | */ |
||
13 | public $user_id; |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | public $full_name; |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | public $photo; |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | public $birth_day; |
||
26 | /** |
||
27 | * @var \app\models\UserProfile |
||
28 | */ |
||
29 | private $model; |
||
30 | |||
31 | /** |
||
32 | * @return array the validation rules. |
||
33 | */ |
||
34 | 1 | public function rules() |
|
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | 1 | public function attributeLabels() |
|
59 | |||
60 | /** |
||
61 | * Set model |
||
62 | * |
||
63 | * @param UserProfile $model |
||
64 | */ |
||
65 | 1 | public function setModel(UserProfile $model): void |
|
74 | |||
75 | /** |
||
76 | * Get model |
||
77 | * |
||
78 | * @return UserProfile |
||
79 | */ |
||
80 | 1 | public function model(): UserProfile |
|
88 | |||
89 | public function save() |
||
104 | } |
||
105 |