/
pashko
/
siec
Обзор
Документация
Войти
/
pashko
/
siec
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
common/models/Banner.php
63 строки
1 KB
Kokorin Pavel
fixs
26 июл 2020, 10:48
26 июл 2020, 10:48
ef973b0
Код
Авторство
О чём код?
<?php namespace common\models; use yii\db\ActiveRecord; /** * This is the model class for table "banner". * * @property int $id * @property string $title * @property string $subtitle * @property string $short_text * @property int $sort * @property string $button_text */ class Banner extends ActiveRecord { function behaviors() { return [ 'images' => [ 'class' => 'dvizh\gallery\behaviors\AttachImages', 'mode' => 'single', ], ]; } /** * @inheritdoc */ public static function tableName() { return 'banner'; } /** * @inheritdoc */ public function rules() { return [ [['title'], 'required'], [['short_text'], 'string'], [['sort'], 'integer'], [['title', 'subtitle', 'button_text'], 'string', 'max' => 255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'title' => 'Title', 'subtitle' => 'Subtitle', 'short_text' => 'Short Text', 'sort' => 'Sort', 'button_text' => 'Button Text', ]; } }