Beispiel #1
0
 public function attributeLabels()
 {
     return array_merge(parent::attributeLabels(), ['name_es' => Yii::t('catchment', 'Name (Spanish)'), 'name_ne' => Yii::t('catchment', 'Name (Nepali)'), 'description_es' => Yii::t('catchment', 'Description (Spanish)'), 'description_ne' => Yii::t('catchment', 'Description (Nepali)')]);
 }
Beispiel #2
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['catchmentid'], 'required'], [['catchmentid'], 'integer'], [['latitude', 'longitude', 'height', 'width', 'angle'], 'number'], [['name', 'sensortype', 'property', 'admin_email'], 'string', 'max' => 255], [['units'], 'string', 'max' => 4], [['catchmentid'], 'exist', 'skipOnError' => true, 'targetClass' => Catchment::className(), 'targetAttribute' => ['catchmentid' => 'id']]];
 }