Ejemplo n.º 1
0
 /**
  * @param \Generated\Shared\Transfer\AddressTransfer $addressTransfer
  *
  * @return int
  */
 protected function retrieveFkCountry(AddressTransfer $addressTransfer)
 {
     $fkCountry = $addressTransfer->getFkCountry();
     if (empty($fkCountry)) {
         $iso2Code = $addressTransfer->getIso2Code();
         if (empty($iso2Code) === false) {
             $fkCountry = $this->countryFacade->getIdCountryByIso2Code($iso2Code);
         } else {
             $fkCountry = $this->getCustomerCountryId();
         }
     }
     return $fkCountry;
 }
Ejemplo n.º 2
0
 /**
  * @return array
  */
 protected function getPreferredCountryChoices()
 {
     return [$this->countryFacade->getPreferredCountryByName(self::PREFERRED_COUNTRY_NAME)->getIdCountry()];
 }