/
pashko
/
siec
Обзор
Документация
Войти
/
pashko
/
siec
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
common/models/Plus.php
66 строк
1 KB
Kokorin Pavel
copy past sta files
22 апр 2020, 11:01
22 апр 2020, 11:01
6fdb817
Код
Авторство
О чём код?
<?php namespace common\models; use Yii; /** * This is the model class for table "plus". * * @property int $id * @property int $category_id * @property string $title * @property string $text * @property string $active * @property int $sort */ class Plus extends \yii\db\ActiveRecord { /** * {@inheritdoc} */ public static function tableName() { return 'plus'; } function behaviors() { return [ 'images' => [ 'class' => 'dvizh\gallery\behaviors\AttachImages', 'mode' => 'single', 'quality' => 60, 'galleryId' => 'picture' ], ]; } /** * {@inheritdoc} */ public function rules() { return [ [['category_id', 'sort'], 'integer'], [['title', 'text'], 'required'], [['text', 'active'], 'string'], [['title'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'category_id' => 'Category ID', 'title' => 'Title', 'text' => 'Text', 'active' => 'Active', 'sort' => 'Sort', ]; } }