示例#1
0
 /**
  * @param \Generated\Shared\Transfer\AddressTransfer $addressTransfer
  * @param \Orm\Zed\Sales\Persistence\SpySalesOrderAddress $salesOrderAddressEntity
  *
  * @return void
  */
 protected function hydrateSalesOrderAddress(AddressTransfer $addressTransfer, SpySalesOrderAddress $salesOrderAddressEntity)
 {
     $salesOrderAddressEntity->fromArray($addressTransfer->toArray());
     $salesOrderAddressEntity->setFkCountry($this->countryFacade->getIdCountryByIso2Code($addressTransfer->getIso2Code()));
 }
示例#2
0
 /**
  * @return \Orm\Zed\Sales\Persistence\SpySalesOrderAddress
  */
 protected function createSalesOrderAddress()
 {
     $salesOrderAddressEntity = new SpySalesOrderAddress();
     $salesOrderAddressEntity->setAddress1(1);
     $salesOrderAddressEntity->setAddress2(2);
     $salesOrderAddressEntity->setSalutation('Mr');
     $salesOrderAddressEntity->setCellPhone('123456789');
     $salesOrderAddressEntity->setCity('City');
     $salesOrderAddressEntity->setCreatedAt(new \DateTime());
     $salesOrderAddressEntity->setUpdatedAt(new \DateTime());
     $salesOrderAddressEntity->setComment('Comment');
     $salesOrderAddressEntity->setDescription('Description');
     $salesOrderAddressEntity->setCompany('Company');
     $salesOrderAddressEntity->setFirstName('FirstName');
     $salesOrderAddressEntity->setLastName('LastName');
     $salesOrderAddressEntity->setFkCountry(1);
     $salesOrderAddressEntity->setEmail('Email');
     $salesOrderAddressEntity->setZipCode(12345);
     $salesOrderAddressEntity->save();
     return $salesOrderAddressEntity;
 }