Example #1
0
 /**
  * @param Account $account
  * @param bool $andFlush
  * @todo need remove this method after task CRM-272 will done
  */
 public function generate(Account $account, $andFlush = false)
 {
     $channel = new Channel();
     $channel->setAccount($account);
     $channel->setName('Привлечение');
     $dealState = new DealState();
     $dealState->setName('Звонок');
     $dealState->setAccount($account);
     $dealState->setIcon('fa fa-phone');
     $this->em->persist($channel);
     $this->em->persist($dealState);
     if ($andFlush) {
         $this->em->flush();
     }
 }
Example #2
0
 /**
  * @return Channel
  */
 public function create()
 {
     $channel = new Channel();
     $channel->setAccount($this->getCurrentAccount());
     return $channel;
 }