Пример #1
0
 public function insert(array $data)
 {
     $patioTypeEntity = $this->entityManager->getReference('Domain\\Entity\\Address\\PatioTypeEntity', $data['patioTypeId']);
     $federativeUnitEntity = $this->entityManager->getReference('Domain\\Entity\\Address\\FederativeUnitEntity', $data['federativeUnitId']);
     $customerEntity = $this->entityManager->getReference('Domain\\Entity\\Customer\\CustomerEntity', $data['customerId']);
     $addressEntity = new AddressEntity();
     $addressEntity->setPatio($data['patio'])->setNumber($data['number'])->setComplement($data['complement'])->setNeighborhood($data['neighborhood'])->setCity($data['city'])->setZipCode($data['zipCode'])->setPatioType($patioTypeEntity)->setFederativeUnit($federativeUnitEntity)->setCustomer($customerEntity);
     return $this->commit($addressEntity);
 }
 /**
  * {@inheritDoc}
  */
 public function setCustomer($customer)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCustomer', array($customer));
     return parent::setCustomer($customer);
 }