src/Admin/presenters/BusinessmanPresenter.php 1 location
|
@@ 278-287 (lines=10) @@
|
275 |
|
|
276 |
|
$this->company = $this->em->getRepository('\WebCMS\InvestformModule\Entity\Company')->find($this->businessman->getCompany()->getId()); |
277 |
|
|
278 |
|
if ($this->company->getActive()) { |
279 |
|
$this->businessman->setActive(true); |
280 |
|
|
281 |
|
$this->em->flush(); |
282 |
|
|
283 |
|
$this->flashMessage('Businessman has been activated', 'success'); |
284 |
|
|
285 |
|
} else { |
286 |
|
$this->flashMessage('Active state cannot be changed. Company is inactive.', 'error'); |
287 |
|
} |
288 |
|
|
289 |
|
if ($inDetail) { |
290 |
|
$this->forward('detail', array( |
src/Admin/presenters/CompanyPresenter.php 1 location
|
@@ 374-383 (lines=10) @@
|
371 |
|
|
372 |
|
$this->company = $this->em->getRepository('\WebCMS\InvestformModule\Entity\Company')->find($businessman->getCompany()->getId()); |
373 |
|
|
374 |
|
if ($this->company->getActive()) { |
375 |
|
$businessman->setActive(true); |
376 |
|
|
377 |
|
$this->em->flush(); |
378 |
|
|
379 |
|
$this->flashMessage('Active state has been changed', 'success'); |
380 |
|
} else { |
381 |
|
|
382 |
|
$this->flashMessage('Active state cannot be changed. Company is inactive.', 'error'); |
383 |
|
} |
384 |
|
|
385 |
|
} else { |
386 |
|
$businessman->setActive(false); |