/** * Form behavior when input data * handling string input, insert it as new model * * @return array */ public function behaviors() { return [['class' => CountryBehavior::className(), 'countryAttribute' => 'country_id'], ['class' => ProvinceBehavior::className(), 'countryAttribute' => 'country_id', 'provinceAttribute' => 'province_id'], ['class' => CityBehavior::className(), 'provinceAttribute' => 'province_id', 'cityAttribute' => 'city_id']]; }
/** * Form behavior when input data * handling string input, insert it as new model * * @return array */ public function behaviors() { return [['class' => CountryBehavior::className(), 'countryAttribute' => 'country_id']]; }