Example #1
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["username" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('main/app', 'Username'), "isRequired" => true], "params" => [$this->owner, "username"]], "email" => ["definition" => ["class" => \common\db\fields\EmailField::className(), "title" => Yii::t('main/app', 'Email'), "isRequired" => false, "showInGrid" => false], "params" => [$this->owner, "email"]], "text" => ["definition" => ["class" => \common\db\fields\MarkItUpField::className(), "title" => Yii::t('main/app', 'Comment'), "isRequired" => true, "showInGrid" => true], "params" => [$this->owner, "text"]], "model" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('main/app', 'Model class'), "isRequired" => true, "gridFilter" => $this->owner->getClasses(), "gridOptions" => ["value" => function ($model) {
         $cls = $model->model;
         if (class_exists($cls)) {
             return $cls::getEntityName();
         } else {
             return $cls;
         }
     }]], "params" => [$this->owner, "model"]], "item_id" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('main/app', 'Item id'), "isRequired" => true], "params" => [$this->owner, "item_id"]]];
 }
Example #2
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ['active' => ['definition' => ['initValue' => false]], 'username' => ['definition' => ['class' => fields\TextField::className(), 'title' => Yii::t('main/app', 'Username'), 'isRequired' => true], 'params' => [$this->owner, 'username']], 'email' => ['definition' => ['class' => fields\EmailField::className(), 'title' => Yii::t('main/app', 'Email'), 'isRequired' => false, 'showInGrid' => false], 'params' => [$this->owner, 'email']], 'rating' => ['definition' => ['class' => fields\NumberField::className(), 'title' => Yii::t('main/app', 'Rating'), 'min' => 0, 'max' => 5, 'isRequired' => true, 'editInGrid' => true, 'inputClass' => ['class' => RatingInput::className(), 'widgetOptions' => ['pluginOptions' => ['min' => 0, 'max' => 5, 'stars' => 5, 'step' => 1, 'size' => 'sm', 'showClear' => false, 'showCaption' => false]]]], 'params' => [$this->owner, 'rating']], 'text' => ['definition' => ['class' => fields\TextAreaField::className(), 'title' => Yii::t('main/app', 'Review'), 'isRequired' => true, 'showInGrid' => true], 'params' => [$this->owner, 'text']], 'model' => ['definition' => ['class' => fields\TextField::className(), 'title' => Yii::t('main/app', 'Model class'), 'isRequired' => true], 'params' => [$this->owner, 'model']], 'item_id' => ['definition' => ['class' => fields\NumberField::className(), 'title' => Yii::t('main/app', 'Item id'), 'isRequired' => true], 'params' => [$this->owner, 'item_id']], 'source_model' => ['definition' => ['class' => fields\TextField::className(), 'title' => Yii::t('main/app', 'Model class'), 'isRequired' => true], 'params' => [$this->owner, 'source_model']], 'source_item_id' => ['definition' => ['class' => fields\NumberField::className(), 'title' => Yii::t('main/app', 'Item id'), 'isRequired' => true], 'params' => [$this->owner, 'source_item_id']], 'count' => ['definition' => ['class' => fields\NumberField::className(), 'title' => Yii::t('main/app', 'Reviews Count'), 'isRequired' => true, 'initValue' => 0, 'showInForm' => false], 'params' => [$this->owner, 'count']], 'rating_total' => ['definition' => ['class' => fields\NumberField::className(), 'title' => Yii::t('main/app', 'Rating Total'), 'isRequired' => true, 'initValue' => 0, 'showInForm' => false], 'params' => [$this->owner, 'rating_total']], 'rating_average' => ['definition' => ['class' => fields\NumberField::className(), 'title' => Yii::t('main/app', 'Rating Average'), 'isRequired' => true, 'initValue' => 0, 'showInForm' => false], 'params' => [$this->owner, 'rating_average']]];
 }
Example #3
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["region_id" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('geo/app', 'Region id')], "params" => [$this->owner, "region_id"]], "rajon_id" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('geo/app', 'Rajon id')], "params" => [$this->owner, "rajon_id"]], "clean_title" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('geo/app', 'Clean title'), "isRequired" => false], "params" => [$this->owner, "clean_title"]], "title" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('geo/app', 'Title'), "isRequired" => true, "editInGrid" => true], "params" => [$this->owner, "title"]], "title2" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('geo/app', 'Title 2'), "isRequired" => false], "params" => [$this->owner, "title2"]], "type" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('geo/app', 'Type'), "isRequired" => false], "params" => [$this->owner, "type"]], "type_ext" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('geo/app', 'Type ext'), "isRequired" => false], "params" => [$this->owner, "type_ext"]], "code" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('geo/app', 'Code'), "isRequired" => false], "params" => [$this->owner, "code"]]];
 }
Example #4
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["title" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('shop/app', 'Title'), "isRequired" => true, "editInGrid" => true], "params" => [$this->owner, "title"]], "text" => ["definition" => ["class" => \common\db\fields\HtmlField::className(), "title" => Yii::t('shop/app', 'Text')], "params" => [$this->owner, "text"]], "price" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('shop/app', 'Price')], "params" => [$this->owner, "price"]], "free_limit" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('shop/app', 'Free limit')], "params" => [$this->owner, "free_limit"]], "class" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('shop/app', 'Class'), "showInGrid" => false], "params" => [$this->owner, "class"]], "sort" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('shop/app', 'Sort'), "showInGrid" => true, "editInGrid" => true], "params" => [$this->owner, "sort"]]];
 }
Example #5
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["sections" => ["definition" => ["class" => \common\db\fields\ManyManyField::className(), "title" => Yii::t('catalog/app', 'Catalog Sections'), "isRequired" => true, "data" => [$this, "getSectionsList"]], "params" => [$this->owner, "sectionsIds", "sections"]], "title" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('catalog/app', 'Title'), "isRequired" => true, "editInGrid" => true], "params" => [$this->owner, "title"]], "code" => ["definition" => ["class" => \common\db\fields\CodeField::className(), "title" => Yii::t('catalog/app', 'Code'), "isRequired" => true, "showInGrid" => false, "generateFrom" => "title"], "params" => [$this->owner, "code"]], "comments" => ["definition" => ["class" => \common\db\fields\CheckBoxField::className(), "title" => Yii::t('catalog/app', 'Comments'), "isRequired" => false], "params" => [$this->owner, "comments"]], "price" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('catalog/app', 'Price'), "isRequired" => false, "editInGrid" => true], "params" => [$this->owner, "price"]], "image" => ["definition" => ["class" => \common\db\fields\Html5ImageField::className(), "title" => Yii::t('catalog/app', 'Image'), "isRequired" => false], "params" => [$this->owner, "image"]], "annotation" => ["definition" => ["class" => \common\db\fields\TextAreaField::className(), "title" => Yii::t('catalog/app', 'Annotation'), "isRequired" => false], "params" => [$this->owner, "annotation"]], "text" => ["definition" => ["class" => \common\db\fields\HtmlField::className(), "title" => Yii::t('catalog/app', 'Text'), "isRequired" => false], "params" => [$this->owner, "text"]], "producer_id" => ["definition" => ["class" => \common\db\fields\HasOneField::className(), "title" => Yii::t('catalog/app', 'Producer'), "isRequired" => false, "showInGrid" => false, "data" => [$this, "getProducersList"]], "params" => [$this->owner, "producer_id", "producer"]], "metatitle" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('catalog/app', 'Meta title'), "isRequired" => false, "showInGrid" => false, "tab" => self::SEO_TAB], "params" => [$this->owner, "metatitle"]], "keywords" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('catalog/app', 'Keywords'), "isRequired" => false, "showInGrid" => false, "tab" => self::SEO_TAB], "params" => [$this->owner, "keywords"]], "description" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('catalog/app', 'Description'), "isRequired" => false, "showInGrid" => false, "tab" => self::SEO_TAB], "params" => [$this->owner, "description"]]];
 }
Example #6
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["order_id" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('shop/app', 'Order ID'), "isRequired" => true], "params" => [$this->owner, "order_id"]], "title" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('shop/app', 'Title')], "params" => [$this->owner, "title"]], "price" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('shop/app', 'Price'), "isRequired" => true], "params" => [$this->owner, "price"]], "discount" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('shop/app', 'Discount')], "params" => [$this->owner, "discount"]], "qty" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('shop/app', 'Quantity'), "isRequired" => true], "params" => [$this->owner, "qty"]], "item_id" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('shop/app', 'Item ID'), "isRequired" => true], "params" => [$this->owner, "item_id"]], "item_class" => ["definition" => ["class" => \common\db\fields\ListField::className(), "title" => Yii::t('shop/app', 'Item class'), "isRequired" => true, 'data' => [Yii::$app->getModule('shop'), 'getModelNames']], "params" => [$this->owner, "item_class"]], "link" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('shop/app', 'Link'), "showInGrid" => false], "params" => [$this->owner, "link"]], "attrs" => ["definition" => ["class" => \app\modules\shop\db\fields\GoodAttrsField::className(), "title" => Yii::t('shop/app', 'Attributes')], "params" => [$this->owner, "attrs"]], "client_attrs" => ["definition" => ["class" => \app\modules\shop\db\fields\GoodAttrsField::className(), "title" => Yii::t('shop/app', 'Client Attributes')], "params" => [$this->owner, "client_attrs"]]];
 }
Example #7
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ['created_at' => ['definition' => ["showInGrid" => true]], "status_id" => ["definition" => ["class" => \common\db\fields\HasOneField::className(), "title" => Yii::t('shop/app', 'Status'), "isRequired" => true, "showInGrid" => true, "editInGrid" => true, "data" => [$this, "getStatusList"]], "params" => [$this->owner, "status_id", "status"]], "name" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('shop/app', 'Name'), "isRequired" => true, "editInGrid" => true], "params" => [$this->owner, "name"]], "email" => ["definition" => ["class" => \common\db\fields\EmailField::className(), "title" => Yii::t('shop/app', 'Email'), "isRequired" => true, "editInGrid" => true], "params" => [$this->owner, "email"]], "phone" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('shop/app', 'Phone'), "editInGrid" => true], "params" => [$this->owner, "phone"]], "city" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('shop/app', 'City'), "isRequired" => true, "showInGrid" => false], "params" => [$this->owner, "city"]], "index" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('shop/app', 'Index'), "showInGrid" => false], "params" => [$this->owner, "index"]], "address" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('shop/app', 'Address'), "isRequired" => true, "showInGrid" => false], "params" => [$this->owner, "address"]], "comment" => ["definition" => ["class" => \common\db\fields\TextAreaField::className(), "title" => Yii::t('shop/app', 'Comment'), "showInGrid" => false], "params" => [$this->owner, "comment"]], "delivery_id" => ["definition" => ["class" => \common\db\fields\HasOneField::className(), "title" => Yii::t('shop/app', 'Delivery'), "isRequired" => true, "showInGrid" => false, "data" => [$this, "getDeliveryList"]], "params" => [$this->owner, "delivery_id", "delivery"]], "payment_id" => ["definition" => ["class" => \common\db\fields\HasOneField::className(), "title" => Yii::t('shop/app', 'Payment'), "isRequired" => true, "showInGrid" => false, "data" => [$this, "getPaymentList"]], "params" => [$this->owner, "payment_id", "payment"]], "delivery_price" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('shop/app', 'Delivery price'), "showInGrid" => false, "showInForm" => false], "params" => [$this->owner, "delivery_price"]], "totalPrice" => ["definition" => ["class" => \common\db\fields\Field::className(), "title" => Yii::t('shop/app', 'Total price'), "showInGrid" => true, "showInForm" => false, "isSafe" => false, "search" => false, "gridOptions" => ['format' => 'currency']], "params" => [$this->owner, "totalPrice"]]];
 }
Example #8
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["title" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('photogallery/app', 'Title'), "isRequired" => true, "editInGrid" => true], "params" => [$this->owner, "title"]], "code" => ["definition" => ["class" => \common\db\fields\CodeField::className(), "title" => Yii::t('photogallery/app', 'Code'), "isRequired" => true, "showInGrid" => false], "params" => [$this->owner, "code"]], "image" => ["definition" => ["class" => \common\db\fields\Html5ImageField::className(), "title" => Yii::t('photogallery/app', 'Image'), "isRequired" => false], "params" => [$this->owner, "image"]], "text" => ["definition" => ["class" => \common\db\fields\HtmlField::className(), "title" => Yii::t('photogallery/app', 'Text'), "isRequired" => false], "params" => [$this->owner, "text"]], "sort" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('photogallery/app', 'Sort'), "isRequired" => false, "editInGrid" => true, "defaultValue" => 500], "params" => [$this->owner, "sort"]]];
 }
Example #9
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["title" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('main/app', 'Title'), "isRequired" => true], "params" => [$this->owner, "title"]], "code" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('main/app', 'Code'), "isRequired" => true], "params" => [$this->owner, "code"]], "cond_type" => ["definition" => ["class" => \common\db\fields\ListField::className(), "title" => Yii::t('main/app', 'Condition type'), "isRequired" => true, "showInGrid" => false, "data" => [$this->owner, "getConds"]], "params" => [$this->owner, "cond_type"]], "cond" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('main/app', 'Condition'), "isRequired" => false, "showInGrid" => false], "params" => [$this->owner, "cond"]], "sort" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('main/app', 'Sort'), "defaultValue" => ActiveRecord::DEFAULT_SORT, "isRequired" => false, "editInGrid" => true], "params" => [$this->owner, "sort"]], "text" => ["definition" => ["class" => \common\db\fields\HtmlField::className(), "title" => Yii::t('main/app', 'Text'), "isRequired" => false], "params" => [$this->owner, "text"]]];
 }
Example #10
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["title" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('banners/app', 'Title'), "isRequired" => true, "editInGrid" => true], "params" => [$this->owner, "title"]], "place_id" => ["definition" => ["class" => \common\db\fields\HasOneField::className(), "title" => Yii::t('banners/app', 'Place'), "data" => [$this, "getPlaces"], "isRequired" => true], "params" => [$this->owner, "place_id", "place"]], "cond_type" => ["definition" => ["class" => \common\db\fields\ListField::className(), "title" => Yii::t('banners/app', 'Condition type'), "isRequired" => true, "showInGrid" => false, "data" => [$this->owner, "getConds"]], "params" => [$this->owner, "cond_type"]], "cond" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('banners/app', 'Condition'), "isRequired" => false, "showInGrid" => false], "params" => [$this->owner, "cond"]], "image" => ["definition" => ["class" => \common\db\fields\Html5FileField::className(), "title" => Yii::t('banners/app', 'File')], "params" => [$this->owner, "image"]], "link" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('banners/app', 'Link'), "showInGrid" => false], "params" => [$this->owner, "link"]], "target" => ["definition" => ["class" => \common\db\fields\ListField::className(), "title" => Yii::t('banners/app', 'Target'), "showInGrid" => false, "data" => ["\\app\\modules\\banners\\models\\Banner", "getTargets"]], "params" => [$this->owner, "target"]], "text" => ["definition" => ["class" => \common\db\fields\TextAreaField::className(), "title" => Yii::t('banners/app', 'Text')], "params" => [$this->owner, "text"]], "width" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('banners/app', 'Width'), "showInGrid" => false], "params" => [$this->owner, "width"]], "height" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('banners/app', 'Height'), "showInGrid" => false], "params" => [$this->owner, "height"]], "sort" => ["definition" => ["class" => \common\db\fields\NumberField::className(), "title" => Yii::t('banners/app', 'Sort'), "showInGrid" => true, "editInGrid" => true], "params" => [$this->owner, "sort"]]];
 }