rules() public method

public rules ( )
Example #1
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['tree_type_id'], 'integer'], [['code', 'tree_type_id'], 'unique', 'targetAttribute' => ['tree_type_id', 'code'], 'message' => \Yii::t('skeeks/cms', "For this section's type of the code is already in use.")]]);
 }
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return array_merge(parent::rules(), ['id' => \Yii::t('skeeks/shop/app', 'ID'), 'created_by' => \Yii::t('skeeks/shop/app', 'Created By'), 'updated_by' => \Yii::t('skeeks/shop/app', 'Updated By'), 'created_at' => \Yii::t('skeeks/shop/app', 'Created At'), 'updated_at' => \Yii::t('skeeks/shop/app', 'Updated At'), 'name' => \Yii::t('skeeks/shop/app', 'Name'), 'code' => \Yii::t('skeeks/shop/app', 'Code'), 'active' => \Yii::t('skeeks/shop/app', 'Active'), 'priority' => \Yii::t('skeeks/shop/app', 'Priority'), 'property_type' => \Yii::t('skeeks/shop/app', 'Property Type'), 'list_type' => \Yii::t('skeeks/shop/app', 'List Type'), 'multiple' => \Yii::t('skeeks/shop/app', 'Multiple'), 'multiple_cnt' => \Yii::t('skeeks/shop/app', 'Multiple Cnt'), 'with_description' => \Yii::t('skeeks/shop/app', 'With Description'), 'searchable' => \Yii::t('skeeks/cms', 'Searchable'), 'filtrable' => \Yii::t('skeeks/cms', 'Filtrable'), 'is_required' => \Yii::t('skeeks/shop/app', 'Is Required'), 'version' => \Yii::t('skeeks/shop/app', 'Version'), 'component' => \Yii::t('skeeks/shop/app', 'Component'), 'component_settings' => \Yii::t('skeeks/shop/app', 'Component Settings'), 'hint' => \Yii::t('skeeks/cms', 'Hint'), 'smart_filtrable' => \Yii::t('skeeks/cms', 'Smart Filtrable'), 'shop_person_type_id' => \Yii::t('skeeks/shop/app', 'Shop Person Type ID'), 'is_order_location_delivery' => \Yii::t('skeeks/shop/app', 'The value of the properties will be used as the location of the buyer to calculate the cost of delivery (only for type LOCATION)'), 'is_order_location_tax' => \Yii::t('skeeks/shop/app', 'The value of the properties will be used as the location of the buyer to calculate the tax (only for type LOCATION)'), 'is_order_postcode' => \Yii::t('skeeks/shop/app', 'The value of the properties will be used as the postcode for the buyer to calculate the cost of delivery'), 'is_user_email' => \Yii::t('skeeks/shop/app', 'The value of the properties will be used as the E-Mail with the new user registration'), 'is_user_phone' => \Yii::t('skeeks/shop/app', 'The value of the properties will be used as a phone when registering a new user'), 'is_user_username' => \Yii::t('skeeks/shop/app', 'The value of the properties will be used as the login when registering a new user'), 'is_user_name' => \Yii::t('skeeks/shop/app', 'The property value is used as a name when registering a new user'), 'is_buyer_name' => \Yii::t('skeeks/shop/app', 'The value of the properties will be used as the name of the buyer profile')]);
 }
Example #3
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['code'], 'unique']]);
 }
Example #4
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['content_id'], 'integer'], [['code', 'content_id'], 'unique', 'targetAttribute' => ['content_id', 'code'], 'message' => \Yii::t('app', 'For the content of this code is already in use.')]]);
 }
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['form_id'], 'integer'], [['code', 'form_id'], 'unique', 'targetAttribute' => ['code', 'form_id'], 'message' => \Yii::t('skeeks/form2/app', 'User Ids')]]);
 }
Example #6
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     $rules = ArrayHelper::merge(parent::rules(), [[['content_id'], 'integer'], [['code', 'content_id'], 'unique', 'targetAttribute' => ['content_id', 'code'], 'message' => \Yii::t('skeeks/cms', 'For the content of this code is already in use.')]]);
     return $rules;
 }