Example #1
0
 /**
  * @param \Orm\Zed\Customer\Persistence\SpyCustomer $customer
  *
  * @return array
  */
 protected function hydrateCustomerListRow(SpyCustomer $customer)
 {
     $customerRow = $customer->toArray();
     $customerRow[self::COL_FK_COUNTRY] = $this->getCountryNameByCustomer($customer);
     $customerRow[self::COL_CREATED_AT] = $this->dateFormatter->dateTime($customer->getCreatedAt());
     $customerRow[self::ACTIONS] = $this->buildLinks($customer);
     return $customerRow;
 }
Example #2
0
 /**
  * @param \Orm\Zed\Customer\Persistence\SpyCustomer $entity
  *
  * @return \Generated\Shared\Transfer\CustomerTransfer
  */
 protected function entityToCustomerTransfer(SpyCustomer $entity)
 {
     $addressTransfer = new CustomerTransfer();
     return $addressTransfer->fromArray($entity->toArray(), true);
 }