示例#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);
 }
 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;
 }
示例#3
0
 public function setAccount(Account $account)
 {
     $this->account = $account;
     $this->setBroker($account->getBroker());
 }