improve customer api & gui
This commit is contained in:
@@ -11,6 +11,7 @@ use yii\helpers\ArrayHelper;
|
||||
*
|
||||
* @property integer $id
|
||||
* @property string $name
|
||||
* @property string $theme
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
@@ -30,9 +31,10 @@ class EventType extends \yii\db\ActiveRecord
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['name'], 'required'],
|
||||
[['name','theme'], 'required'],
|
||||
[['name'], 'unique'],
|
||||
[['name'], 'string', 'max' => 255]
|
||||
[['name'], 'string', 'max' => 255],
|
||||
[['theme'], 'string', 'max' => 50]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -104,4 +106,12 @@ class EventType extends \yii\db\ActiveRecord
|
||||
// TODO: implement bossiness logic to select ticket
|
||||
return $possibleTickets[0];
|
||||
}
|
||||
|
||||
static function themes() {
|
||||
$themes = [];
|
||||
for ($x = 0; $x < 10; $x++) {
|
||||
$themes[$x] = "Színtéma " . ($x+1);
|
||||
}
|
||||
return $themes;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user