Esempio n. 1
0
 public function createAccount(Account $account)
 {
     $account->setPayoutPercentage($account->getBroker()->getBasePercentage());
     $accountEvent = $this->createAccountEvent($account);
     $this->eventDispatcher->dispatch(AccountEvents::ACCOUNT_CREATED, $accountEvent);
     $this->em->persist($account);
 }
Esempio n. 2
0
 protected function createAccountCreatedEmailMessage(Account $account)
 {
     $broker = $account->getBroker();
     $user = $account->getUser();
     $email = $broker && $broker->getAccountConfirmationEmail() ? $broker->getAccountConfirmationEmail() : '*****@*****.**';
     $subjectLine = 'Please Verify Account';
     $template = 'Account:Verification\\broker';
     $data = array('user' => $user, 'account' => $account, 'broker' => $broker);
     $message = $this->emailMessageManager->createEmailMessage($subjectLine, $template, $data);
     $message->setEmail($email);
     $message->setReplyTo('*****@*****.**');
     return $message;
 }
Esempio n. 3
0
 public function setAccount(Account $account)
 {
     $this->account = $account;
     $this->setBroker($account->getBroker());
 }