/**
  * @param CompanyEntity $companyEntity
  *
  * @return Company
  */
 public static function toDomainObject(CompanyEntity $companyEntity)
 {
     $company = CompanyFactory::build($companyEntity->getName(), $companyEntity->getMainActivity(), $companyEntity->getLegalCode(), $companyEntity->getId());
     //        foreach ($companyEntity->getUser() as $user) {
     //            $company->addUser($user);
     //        }
     return $company;
 }
Exemple #2
0
 /**
  * Creates a form to delete a Company entity.
  *
  * @param Company $company The Company entity
  *
  * @return \Symfony\Component\Form\Form The form
  */
 private function createDeleteForm(Company $company)
 {
     return $this->createFormBuilder()->setAction($this->generateUrl('company_delete', array('id' => $company->getId())))->setMethod('DELETE')->getForm();
 }