public function create($data)
 {
     $company = new Company();
     $company->setData($data);
     $company->save($this->getEntityManager());
     return new JsonModel(['company' => $company->getData()]);
 }
Exemple #2
0
 public function getData()
 {
     return ['company' => $this->company ? $this->company->getData() : null, 'defaultServiceLevel' => $this->defaultServiceLevel, 'id' => $this->id, 'name' => $this->name ? $this->name : '', 'position' => $this->position, 'comments' => $this->comments, 'contracted' => $this->contracted, 'pm' => $this->pm ? $this->pm->getData() : null, 'sales' => $this->sales ? $this->sales->getData() : null];
 }