public function changeEnabled($id_country, $disable = false) { $country_obj = new DpdPolandCountry(DpdPolandCountry::getIdByCountry((int) $id_country)); $country_obj->enabled = $disable ? 0 : 1; $country_obj->id_country = (int) $id_country; return $country_obj->save(); }