Example #1
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["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], "params" => [$this->owner, "code"]], "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"]]];
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function config()
 {
     return ["comments" => ["definition" => ["class" => \common\db\fields\CheckBoxField::className(), "title" => Yii::t('main/app', 'Comments'), "isRequired" => false], "params" => [$this->owner, "comments"]], "parent_id" => ["definition" => ["class" => \common\db\fields\ParentListField::className(), "title" => Yii::t('main/app', 'Parent'), "data" => [$this->owner, "getListTreeData"]], "params" => [$this->owner, "parent_id"]], "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\CodeField::className(), "title" => Yii::t('main/app', 'Code'), "isRequired" => true, "generateFrom" => "title", "uniqueValidatorClassName" => TreeUniqueValidator::className()], "params" => [$this->owner, "code"]], "text" => ["definition" => ["class" => \common\db\fields\HtmlField::className(), "title" => Yii::t('main/app', 'Text'), "isRequired" => false], "params" => [$this->owner, "text"]], "metatitle" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('main/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('main/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('main/app', 'Description'), "isRequired" => false, "showInGrid" => false, "tab" => self::SEO_TAB], "params" => [$this->owner, "description"]], "image" => ["definition" => ["class" => \common\db\fields\Html5ImageField::className(), "title" => Yii::t('main/app', 'Image'), "isRequired" => false, "tab" => self::IMAGE_TAB], "params" => [$this->owner, "image"]]];
 }
Example #3
0
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["sections" => ["definition" => ["class" => \common\db\fields\ManyManyField::className(), "title" => Yii::t('news/app', 'News sections'), "isRequired" => true, "data" => [$this, "getSectionsList"]], "params" => [$this->owner, "sectionsIds", "sections"]], "title" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('news/app', 'Title'), "isRequired" => true, "editInGrid" => true], "params" => [$this->owner, "title"]], "code" => ["definition" => ["class" => \common\db\fields\CodeField::className(), "title" => Yii::t('news/app', 'Code'), "isRequired" => true, "showInGrid" => false, "generateFrom" => "title"], "params" => [$this->owner, "code"]], "comments" => ["definition" => ["class" => \common\db\fields\CheckBoxField::className(), "title" => Yii::t('news/app', 'Comments'), "isRequired" => false], "params" => [$this->owner, "comments"]], "date" => ["definition" => ["class" => \common\db\fields\DateField::className(), "title" => Yii::t('news/app', 'Date'), "isRequired" => false, "editInGrid" => true], "params" => [$this->owner, "date"]], "image" => ["definition" => ["class" => \common\db\fields\Html5ImageField::className(), "title" => Yii::t('news/app', 'Image'), "isRequired" => false], "params" => [$this->owner, "image"]], "annotation" => ["definition" => ["class" => \common\db\fields\TextAreaField::className(), "title" => Yii::t('news/app', 'Annotation'), "isRequired" => false], "params" => [$this->owner, "annotation"]], "text" => ["definition" => ["class" => \common\db\fields\HtmlField::className(), "title" => Yii::t('news/app', 'Text'), "isRequired" => false], "params" => [$this->owner, "text"]], "metatitle" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('news/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('news/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('news/app', 'Description'), "isRequired" => false, "showInGrid" => false, "tab" => self::SEO_TAB], "params" => [$this->owner, "description"]]];
 }
Example #4
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 #5
0
 /**
  * @inheritdoc
  */
 public function config()
 {
     return ["role" => ["definition" => ["class" => \common\db\fields\ListField::className(), "title" => Yii::t('main/app', 'Role'), "isRequired" => true, "data" => [$this->owner, "getRolesNames"]], "params" => [$this->owner, "role"]], "username" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('main/app', 'Username'), "isRequired" => true], "params" => [$this->owner, "username"]], "password" => ["definition" => ["class" => \common\db\fields\PasswordField::className(), "title" => Yii::t('main/app', 'Password'), "isRequired" => false, "showInGrid" => false, "showInView" => false], "params" => [$this->owner, "password"]], "confirm_password" => ["definition" => ["class" => \common\db\fields\PasswordField::className(), "title" => Yii::t('main/app', 'Confirm password'), "isRequired" => false, "showInGrid" => false, "showInView" => false], "params" => [$this->owner, "confirm_password"]], "email" => ["definition" => ["class" => \common\db\fields\EmailField::className(), "title" => Yii::t('main/app', 'Email'), "isRequired" => true], "params" => [$this->owner, "email"]], "name" => ["definition" => ["class" => \common\db\fields\TextField::className(), "title" => Yii::t('main/app', 'Name'), "isRequired" => false], "params" => [$this->owner, "name"]], "image" => ["definition" => ["class" => \common\db\fields\Html5ImageField::className(), "title" => Yii::t('main/app', 'Image'), "isRequired" => false], "params" => [$this->owner, "image"]], "text" => ["definition" => ["class" => \common\db\fields\TextAreaField::className(), "title" => Yii::t('main/app', 'Text'), "isRequired" => false], "params" => [$this->owner, "text"]], "auth_key" => ["definition" => ["class" => \common\db\fields\Field::className(), "title" => Yii::t('main/app', 'Api key'), "isRequired" => false, "showInForm" => false, "showInGrid" => false, "showInExtendedFilter" => false, "isSafe" => false], "params" => [$this->owner, "auth_key"]]];
 }
 /**
  * @inheritdoc
  */
 protected function config()
 {
     return ["parent_id" => ["definition" => ["class" => \common\db\fields\ParentListField::className(), "title" => Yii::t('main/app', 'Parent'), "data" => [$this->owner, 'getListTreeData']], "params" => [$this->owner, "parent_id"]], "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, "generateFrom" => "title"], "params" => [$this->owner, "code"]], "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"]], "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"]]];
 }