/** * auto parse attribute * * @return array */ public function behaviors() { return [['class' => RgnCountryBehavior::className(), 'countryAttribute' => 'country_id'], ['class' => RgnProvinceBehavior::className(), 'countryAttribute' => 'country_id', 'provinceAttribute' => 'province_id'], ['class' => RgnCityBehavior::className(), 'provinceAttribute' => 'province_id', 'cityAttribute' => 'city_id']]; }
/** * Form behavior when input data * * @return array */ public function behaviors() { return [['class' => RgnCountryBehavior::className(), 'countryAttribute' => 'country_id']]; }