/** * @param Trader $trader * @throws \Exception */ public function disableTrader(Trader $trader) { try { if ($trader->getEnabled()) { $trader->setEnabled(false); $this->persistAndFlush($trader); } } catch (\Exception $e) { throw $e; } }
/** * * @param Trader $trader */ public function setTrader(Trader $trader) { $this->trader = $trader; $this->trader->setEmail($this->getEmail()); }