You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
633 B
39 lines
633 B
6 years ago
|
<?php
|
||
|
/**
|
||
|
* Created by Error202
|
||
|
* Date: 24.08.2018
|
||
|
*/
|
||
|
|
||
|
namespace core\components;
|
||
|
|
||
|
|
||
|
class TestForm extends LanguageDynamicModel
|
||
|
{
|
||
|
public $name;
|
||
|
public $content;
|
||
|
public $number;
|
||
|
|
||
|
public function rules() {
|
||
|
return array_merge(
|
||
|
parent::rules(),
|
||
|
[
|
||
|
[['name', 'content'], 'required'],
|
||
|
['name', 'string', 'max' => 50],
|
||
|
['content', 'string'],
|
||
|
['number', 'integer'],
|
||
|
]
|
||
|
);
|
||
|
}
|
||
|
|
||
|
public function attributeLabels() {
|
||
|
return array_merge(
|
||
|
parent::attributeLabels(),
|
||
|
[
|
||
|
'name' => \Yii::t('main', 'Name'),
|
||
|
'content' => \Yii::t('main', 'Key'),
|
||
|
'number' => \Yii::t('main', 'Value'),
|
||
|
]
|
||
|
);
|
||
|
}
|
||
|
|
||
|
}
|