Beispiel #1
0
 public function update(CountryUpdateEvent $event)
 {
     if (null !== ($country = CountryQuery::create()->findPk($event->getCountryId()))) {
         $country->setVisible($event->isVisible())->setIsocode($event->getIsocode())->setIsoalpha2($event->getIsoAlpha2())->setIsoalpha3($event->getIsoAlpha3())->setHasStates($event->isHasStates())->setNeedZipCode($event->isNeedZipCode())->setZipCodeFormat($event->getZipCodeFormat())->setLocale($event->getLocale())->setTitle($event->getTitle())->setChapo($event->getChapo())->setDescription($event->getDescription())->save();
         $event->setCountry($country);
     }
 }
Beispiel #2
0
 public function update(CountryUpdateEvent $event)
 {
     if (null !== ($country = CountryQuery::create()->findPk($event->getCountryId()))) {
         $country->setIsocode($event->getIsocode())->setIsoalpha2($event->getIsoAlpha2())->setIsoalpha3($event->getIsoAlpha3())->setLocale($event->getLocale())->setTitle($event->getTitle())->setChapo($event->getChapo())->setDescription($event->getDescription())->save();
         $event->setCountry($country);
     }
 }