当前位置: 首页>>代码示例>>PHP>>正文


PHP Email::emailFormat方法代码示例

本文整理汇总了PHP中Cake\Network\Email\Email::emailFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP Email::emailFormat方法的具体用法?PHP Email::emailFormat怎么用?PHP Email::emailFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cake\Network\Email\Email的用法示例。


在下文中一共展示了Email::emailFormat方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: invite

 /**
  * Index method
  *
  * @return void
  */
 public function invite($tournament_id, $product_id, $count_teams)
 {
     if ($this->request->is('post')) {
         foreach ($this->request->data['player'] as $i => $invites) {
             $email = new Email('korujafc');
             if ($this->request->data['player_status'][$i] == 'email') {
                 $about = '[KorujaFC] Você foi convidado para o KorujaFC!';
                 $message = '<img src="http://www.korujafc.com/img/logo.png" alt="logo">
                     <h3>Olá,</h3>
                     <p>Clique aqui e faça sua inscrição no site para participar do torneio:<a href="http://www.korujafc.com/products/payment/' . $product_id . '/' . $tournament_id . '">INSCREVER</a></p>
                     <spam><i>2016 / <a href="http://www.korujafc.com">KORUJAFC.COM</a></i></spam>';
                 $email->emailFormat('html')->to($invites)->subject($about)->send($message);
             } elseif ($this->request->data['player_status'][$i] == 'login') {
                 $about = '[KorujaFC] Você foi convidado para um torneio.';
                 $message = '<img src="http://www.korujafc.com/img/logo.png" alt="logo">
                     <h3>Olá, ' . $this->request->data['player'][$i] . '</h3>
                     <p>Clique aqui para participar do torneio:<a href="http://www.korujafc.com/products/payment/' . $tournament_id . '">INSCREVER</a></p>
                     <spam><i>2016 / <a href="http://www.korujafc.com">KORUJAFC.COM</a></i></spam>';
                 $email->emailFormat('html')->to($this->request->data['userEmail'][$i])->subject($about)->send($message);
             } elseif ($this->request->data['player_status'][$i] == 'free') {
                 $transactionsTable = TableRegistry::get('Transactions');
                 $transaction = $transactionsTable->newEntity();
                 $transaction->tournament_id = $tournament_id;
                 $transaction->product_id = $product_id;
                 $transaction->user_id = $this->request->data['userId'][$i];
                 $transactionsTable->save($transaction);
             }
         }
         $this->Flash->success('Invitations has been sended.');
         return $this->redirect(['controller' => 'Tournaments', 'action' => 'index', 1]);
     }
     $this->set('count_teams', $count_teams);
 }
开发者ID:albertoneto,项目名称:localhost,代码行数:38,代码来源:InviteusersController.php

示例2: _execute

 public function _execute(array $data)
 {
     $mensagem = sprintf('Contato feito pelo site <br>
         Nome: %s<br>
         Email: %s<br>
         Mensagem: %s', $data['nome'], $data['email'], $data['mensagem']);
     $email = new Email('gmail');
     $email->to('any@gmail.com');
     $email->subject('Contato');
     $email->emailFormat('html');
     return $email->send($mensagem);
 }
开发者ID:rafaelschn,项目名称:cake3lab,代码行数:12,代码来源:ContatoForm.php

示例3: afterForgot

 public function afterForgot($event, $user)
 {
     $email = new Email('default');
     $email->viewVars(['user' => $user, 'resetUrl' => Router::fullBaseUrl() . Router::url(['prefix' => false, 'plugin' => 'Users', 'controller' => 'Users', 'action' => 'reset', $user['email'], $user['request_key']]), 'baseUrl' => Router::fullBaseUrl(), 'loginUrl' => Router::fullBaseUrl() . '/login']);
     $email->from(Configure::read('Users.email.from'));
     $email->subject(Configure::read('Users.email.afterForgot.subject'));
     $email->emailFormat('both');
     $email->transport(Configure::read('Users.email.transport'));
     $email->template('Users.afterForgot', 'Users.default');
     $email->to($user['email']);
     $email->send();
 }
开发者ID:hareshpatel1990,项目名称:cakephp-users,代码行数:12,代码来源:UsersMailer.php

示例4: _execute

 protected function _execute(array $data)
 {
     $email = new Email('default');
     $email->template("devis");
     $email->emailFormat("both");
     $email->viewVars($data);
     $email->from(["contact@renopatrimoine.fr" => "Contact Reno Patrimoine"]);
     $email->to("panini.zozo@gmail.com");
     $email->subject("Demande de devis: " . $data["prenom"] . " " . $data["nom"]);
     $email->send();
     return true;
 }
开发者ID:JulienPapini,项目名称:RenoPatrimoine,代码行数:12,代码来源:DevisForm.php

示例5: userSignupEmail

 function userSignupEmail($event)
 {
     $this->emails = TableRegistry::get('Emails');
     $emailTemplate = $this->emails->find()->where(['Emails.code' => 'signup_email'])->first();
     $user = $event->data['user'];
     $emailAddress = $user->email;
     $params = ['%name%' => $user->name, '%email%' => $user->email];
     $subject = str_replace(array_keys($params), array_values($params), $emailTemplate->subject);
     $content = str_replace(array_keys($params), array_values($params), $emailTemplate->message);
     echo $emailAddress;
     $email = new Email('default');
     $email->emailFormat('both')->to($emailAddress)->subject($subject)->viewVars(['content' => $content])->send();
 }
开发者ID:hunnybohara,项目名称:coin_bates,代码行数:13,代码来源:EmailListener.php

示例6: sendMail

 /**
  * Check email in stack and send to user
  * @throws Exception
  * @return void
  */
 public function sendMail()
 {
     $mails = $this->EmailStacks->find()->where(['sent' => false]);
     $dataResult = [];
     foreach ($mails as $row) {
         $email = new Email('default');
         if ($email->emailFormat('html')->template('content')->to($row->email)->subject($row->subject)->viewVars(['content' => $row->content])->send()) {
             $ent = $this->EmailStacks->get($row->id);
             $ent->sent = true;
             $this->EmailStacks->save($ent);
         }
     }
     return true;
 }
开发者ID:nguyennghiem1205,项目名称:japan-circle,代码行数:19,代码来源:OneMinuteShell.php

示例7: sendMail

 public function sendMail($to, $subject, $from, $message, $attachments = null, $emailCofig = 'default', $emailtemplate = 'default', $formate = 'html', $replyto = null, $cc = null, $bcc = null)
 {
     $email = new Email('default');
     $email->emailFormat($formate);
     $email->from(array($from => Configure::read('FROM_EMAIL_NAME')));
     $email->to($to);
     $email->cc($cc);
     $email->bcc($bcc);
     $email->replyTo($replyto);
     $email->subject($subject);
     $email->template($emailtemplate, 'default');
     //        $email->attachments($attachments);
     if ($email->send($message)) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:mayurgodhanii,项目名称:cakephp_mailcomponent,代码行数:18,代码来源:MailerComponent.php

示例8: sendNotification

 /**
  * Abstract sender method
  *
  * @param User $user The recipient user
  * @param Notification $notification the notification to be sent
  * @param NotificationContent $content the content
  * @return mixed
  */
 public function sendNotification(User $user, Notification $notification, NotificationContent $content)
 {
     $subject = $content->render('email_subject', $notification);
     $htmlBody = $content->render('email_html', $notification);
     $textBody = $content->render('email_text', $notification);
     $email = new Email($this->_config['profile']);
     $email->transport($this->_config['emailTransport']);
     $email->emailFormat('html');
     if (!empty($notification->config['attachments'])) {
         $email->attachments($notification->config['attachments']);
     }
     $email->to([$user->email => $user->firstname . ' ' . $user->lastname]);
     $email->subject($subject);
     if (!empty($this->_config['templated']) && !empty($this->_config['template']) && !empty($this->_config['layout'])) {
         $email->template($this->_config['template'], $this->_config['layout']);
         $email->viewVars(['content' => $htmlBody]);
         return $email->send();
     }
     return $email->send($htmlBody);
 }
开发者ID:kiliansch,项目名称:cake-notifications,代码行数:28,代码来源:EmailTransport.php

示例9: sendEmail

 public function sendEmail($subject, $message, $to, $flash = false)
 {
     $email = new Email('default');
     if (is_string($to)) {
         $email->to($to);
     } else {
         if (is_array($to)) {
             foreach ($to as $value) {
                 $email->addTo($value);
             }
         }
     }
     if ($email->emailFormat('both')->from(['contato@incur.so' => 'InCurso'])->subject($subject)->send($message)) {
         if ($flash) {
             $this->Flash->success('Mensagem enviada com sucesso!');
         }
     } else {
         if ($flash) {
             $this->Flash->error('Não foi possível enviar a mensagem. Por favor, tente mais tarde.');
         }
     }
 }
开发者ID:Allan1,项目名称:Project,代码行数:22,代码来源:AppController.php

示例10: sendResetEmail

 /**
  * Sends reset email
  *
  * @param entity $user User entity.
  * 
  * @return void
  */
 public function sendResetEmail($user)
 {
     $reset_key = uniqid();
     $user->{Configure::read('Lil.passwordResetField')} = $reset_key;
     if ($this->save($user)) {
         $email = new Email('default');
         $email->from([Configure::read('Lil.from.email') => Configure::read('Lil.from.name')]);
         $email->to($user->{Configure::read('Lil.userEmailField')});
         $email->subject(__d('lil', 'Password Reset'));
         $email->template('Lil.reset');
         $email->emailFormat('text');
         $email->viewVars(['reset_key' => $reset_key]);
         $email->helpers(['Html']);
         return $email->send();
     }
     return false;
 }
开发者ID:malamalca,项目名称:lil,代码行数:24,代码来源:UsersTable.php

示例11: add

 /**
  * Add a new order method
  *
  * This is to let customers(users) start a new order and will probably be automated by the shopping cart
  * in all cases unless an admin user is generating an order manually.
  *
  * @return void Redirects on successful add, renders view otherwise.
  */
 public function add()
 {
     //create a new order entity in the database
     $order = $this->Orders->newEntity();
     //if the http request is of type post then
     if ($this->request->is('post')) {
         //use the data in the add order form to update the new order Database entry
         $order = $this->Orders->patchEntity($order, $this->request->data);
         //pre set the ordered_date and courier id as we are not including that this build.
         $order->ordered_date = date("Y-m-d");
         $order->courier_id = "1";
         //set gged in user id as the order user id property
         $loggedUser = $this->request->session()->read('user');
         $order->user_id = $loggedUser['id'];
         if ($this->request->session()->read('userRole') == 'user') {
             //grab the users customer ID to add to the order
             $query = TableRegistry::get('Customers')->find();
             $query->where(['user_id' => $order->user_id]);
             foreach ($query as $orderCustomer) {
                 //set the ordering customer id as users ID
                 $order->customer_id = $orderCustomer['id'];
             }
         }
         //otherwise we show the drop down list and select the customer ID from there, allowing for
         //  customer selection on order creation for,
         //if the order save process is a success
         if ($this->Orders->save($order)) {
             //show user it worked and redirect them back to the order listing (will soon be only their orders listed)
             $this->Flash->success('The order has been placed in our system. Your order will be processed soon.');
             //send an email to rick letting him know that an order was placed.
             //Send email to customer with their new reset password hashed link/url
             //create email object and set email config settings
             $orderEmail = new Email('default');
             $orderEmail->transport('default');
             //set the type of email format and use our custom template.
             $orderEmail->emailFormat('html');
             $orderEmail->template('order_email');
             //set the email to send to
             $orderEmail->to(Configure::read('orderRecievedEmail'));
             $orderEmail->subject('Solemate Order has been placed on ' . date("Y-m-d"));
             //Set the email headers.
             $orderEmail->from(['solemateDoormats@doNotReply.com' => 'Solemate Doormats Web Orders']);
             $orderEmail->sender(['solemate.doormats@gmail.com' => 'Solemate Doormats inc']);
             $orderEmail->replyTo('solemate.doormats@gmail.com');
             //email message and send line
             $orderEmail->send('Hi there admin this is an automated email to let you know a new order has been placed on the website ordering system, the order id is ' . $order->id . '. The customer id was ' . $order->customer_id);
             return $this->redirect(['action' => 'index']);
         } else {
             $this->Flash->error('The order could not be saved. Please, try again.');
         }
     }
     //get all couriers and customers ready for linking to this new order
     //(customer = orderie & courier = delivery choice by customer/user)
     $couriers = $this->Orders->Couriers->find('list', ['limit' => 200]);
     //check if the user is a salesRep then just show only his customers.
     if ($this->request->session()->read('userRole') == 'salesRep') {
         //grab all customers from the model
         //$allCusts = $this->Customers->find("all");
         $query = TableRegistry::get('Customers')->find("all");
         //create space for just the logged in users customers
         $repCustomers = array();
         //loop through all customers
         foreach ($query as $aCust) {
             //if the logged in user id matches the stored customer-user id
             if ($this->Auth->user('id') == $aCust['user_id']) {
                 //debug($aCust);
                 //push the specific contents onto the customers array for display on add order view page.
                 array_push($repCustomers, array($aCust['id'] => $aCust['first_name'] . ' ' . $aCust['last_name']));
             }
         }
         //now set the view variable as the users customers only.
         $customers = $repCustomers;
     } else {
         if ($this->request->session()->read('userRole') == 'admin') {
             $customers = $this->Orders->Customers->find('list', ['limit' => 200]);
         }
     }
     //set the ViewVars for the view page add.
     $this->set(compact('order', 'couriers', 'customers'));
     $this->set('_serialize', ['order']);
 }
开发者ID:eddiePower,项目名称:cakephp,代码行数:89,代码来源:OrdersController.php

示例12: resetPassword

 /**
  * Reset Password method
  *
  * @param string|null $id User id.
  * @return void Redirects to password reset page.
  * @throws \Cake\Network\Exception\NotFoundException When user record not found.
  *
  * @description This will run when the user clicks on the reset password
  *  link to generate a new replacment password. This is done by entering their email address
  *    that they registered with, this ensures the user owns the account 
  *   they are resetting the password on and also that they cant intercept the
  *   new password.  We firstly generate a random string storing it in the database then
  * this string is sent as part of the users link to click on again ensuring the user requesting
  * the new password is the one who owns the account.  After the user arrives at the url they are
  *  presented with a small form consisting of 2 password fields: Password & Confirm Password
  * after a quick check that the passwords match the new password is Hashed and stored in the DB
  *  and the user is returned to the log in page with a flash message telling them it worked 
  * if there was an error the page will not re direct and will display the error allowing user to retry.
  *
  */
 public function resetPassword()
 {
     //set this function to only run with data from a post request
     //$this->request->allowMethod(['post']);
     //check the form has been submitted
     if (isset($_POST['txtEmail'])) {
         /*
             Build a custom SQL query object to find all users and 
             filter that to the user whos email matches the form data
             on the reset password form.
         */
         $query = TableRegistry::get('Users')->find();
         $query->where(['email' => $_POST['txtEmail']]);
         //loop through query result
         foreach ($query as $user) {
             //when we match on the right user data from our DB lookup
             if ($user->email == $_POST['txtEmail']) {
                 //set the viewVariable to this userEmail.
                 $selectedUser = $user;
             }
         }
         //end foreach query result (should only be one in this case)
         if (isset($selectedUser)) {
             //if the selectedUser data isSet then set the viewVar with this data else do nothing to prevent empty form submit.
             $this->set('selectedUser', $selectedUser);
             //Create new random HASHED String to send to user
             // for security and randomness i mixed older md5 with nice sha256 ;)
             $intermediateSalt = md5(uniqid(rand(), true));
             //set a temp string of 7 digits in length no decimal places
             $salt = substr($intermediateSalt, 0, 7);
             //now run random string through a 256bit sha encrypt  - maybe overkill?
             $randPassword = hash("sha256", $salt);
             //update the selectedUsers reset value from old to new.
             $selectedUser->reset = $randPassword;
             //Store temp HASH in user database
             //store the id of the user in question to save time on a db lookup.
             $id = $selectedUser->id;
             //Send email to customer with their new reset password hashed link/url
             //create email object and set email config settings
             $tempEmail = new Email('default');
             $tempEmail->transport('default');
             //set the type of email format and use our custom template.
             $tempEmail->emailFormat('html');
             $tempEmail->template('sendPwreset');
             //set the email to send to
             $tempEmail->to($selectedUser->email);
             $tempEmail->subject('Solemate Password Reset');
             //Set the email headers.
             $tempEmail->from(['solemateDoormats@doNotReply.com' => 'Solemate Doormats inc']);
             $tempEmail->sender(['solemate.doormats@gmail.com' => 'Solemate Doormats inc']);
             $tempEmail->replyTo('solemate.doormats@gmail.com');
             //generate a url using our generated random hash and user id
             $fullUrl = Router::url(array('controller' => 'Users', 'action' => 'resetPassword', 'pwr' => $selectedUser->reset, 'id' => $selectedUser->id), true);
             //Build the message to send to the users requesting the new password.
             $message = "Solemate Doormats Password Reset<br />We received a requested to reset the password on your account, If you made a mistake by clicking the forgot password link then please feel free to disregard this email.  ";
             $message .= " We would like you to click the link below to reset your login password,<br />";
             $message .= "<a href='" . $fullUrl . "'>Click here to reset/change your password.</a><br />";
             $message .= "If you continue to get these password reset emails without requesting them feel free to contact the admin staff by email here at Solemate Doormats and we can investigate it for you.";
             $message .= ".  Here at Solemate Doormats we keep our users passwords private even from the admins.  Feel free to drop us a email if";
             $message .= " you would like more information on your account security, or if you feel someone else is requesting these password resets maliciously.";
             $message .= "<br /><br /><br /><b>Privacy Agreement:</b><i>All content sent / displayed from Solemate Doormats / IB Australia is for private customer use only, any materials shown in these emails are copyright";
             $message .= " protected by Solemate Doormats and should under no circumstance be used without written consent from the company owner, any use of these materials";
             $message .= " without consent will be seen as an act of IP copyright breach and will be followed with appropriate legal action.  If you are not the intended recipient of this email please disregard and delete this message, if this is in hard copy please shred any copies you may have received in error.  ";
             $message .= "Materials covered by I.P. copyright: Logo's, Doormat print's / design's, the Solemate Doormats trading name, Solemate Doormats colour scheme's.";
             $message .= "<br /><p align='center'> &copy; 2015 IB Australia - Solemate Doormats</p></i>";
             /*
               Use a custom query to save our new random string into the users db entry for checking 
               user email starts the password reset.
             */
             $query2 = TableRegistry::get('Users')->find();
             $query2->update('Users')->set(['reset' => $randPassword])->where(['id' => $id]);
             $stmt = $query2->execute();
             //May not be needed
             $tempEmail->viewVars(array('cust' => $selectedUser));
             //email message and send line
             $tempEmail->send($message);
         } else {
             $this->Flash->error('Error: This user email address was not found in our database.  Try again with the address you registered with please.');
         }
     } else {
//.........这里部分代码省略.........
开发者ID:eddiePower,项目名称:cakephp,代码行数:101,代码来源:UsersController.php

示例13: partnerbpapprovalnotification

 public function partnerbpapprovalnotification($email = null, $qrter = null)
 {
     if ($email != null) {
         $msg = __("Hi,\n Your campaign plan has been approved for ") . $qrter . __(" Please log in to the website for more details.");
         $fgemail = new Email('default');
         $fgemail->sender($this->portal_settings['site_email'], $this->portal_settings['site_name']);
         $fgemail->from([$this->portal_settings['site_email'] => $this->portal_settings['site_name']]);
         $fgemail->to($email);
         $fgemail->subject(__('Congratulations, your campaign plan application has been approved.'));
         $fgemail->emailFormat('both');
         $fgemail->send($msg);
         return true;
     }
     return false;
 }
开发者ID:franky0930,项目名称:MarketingConnex,代码行数:15,代码来源:PrmsemailsComponent.php

示例14: sendremind

 public function sendremind()
 {
     $this->loadModel('Shows');
     $this->loadModel('Users');
     $this->loadModel('ShowUserPerms');
     $showsToRemind = $this->Shows->find('list', ['valueField' => 'name', 'keyField' => 'id'])->where(['Shows.is_active' => 1])->where(['Shows.is_reminded' => 1]);
     if (sizeof($showsToRemind->toArray()) > 0) {
         $usersToRemindArr = $this->ShowUserPerms->find('list', ['valueField' => 'id', 'keyField' => 'user_id'])->where(['show_id IN' => array_keys($showsToRemind->toArray())])->where(['is_paid' => 1]);
         $usersToRemind = $this->Users->find()->where(['is_active' => 1])->where(['is_notified' => 1])->where(['id IN' => array_keys($usersToRemindArr->toArray())]);
         foreach ($usersToRemind as $thisUser) {
             $this->out('Sending to: ' . $thisUser->first);
             $email = new Email();
             $email->transport('default');
             $email->emailFormat('both');
             $email->to($thisUser->username);
             $email->subject('Hours are Due!');
             $email->from('tdtracx@tdtrac.com');
             $email->template('hourremind');
             $email->viewVars(['name' => $thisUser->first . " " . $thisUser->last]);
             $email->send();
         }
     }
     $this->verbose('  E-Mail(s) Sent.');
 }
开发者ID:jtsage,项目名称:TDTracX,代码行数:24,代码来源:TdtracShell.php

示例15: secondTurn

 public function secondTurn($id)
 {
     $this->autoRender = false;
     $this->viewBuilder()->layout(false);
     set_time_limit(0);
     $tournament = $this->Tournaments->get($id);
     $gamesTable = TableRegistry::get('Games');
     $gameCheck = $gamesTable->find()->select(['id'])->where(['tournament_id' => $id])->first();
     if (!$gameCheck) {
         $this->Flash->error(__('The tournament was not started already.'));
         return $this->redirect(['action' => 'index', $tournament->product_id]);
     }
     $gamesTable = TableRegistry::get('Games');
     $secondTurnCheck = $gamesTable->find()->select(['id'])->where(['tournament_id' => $id, 'is_second_turn' => true])->first();
     if ($secondTurnCheck) {
         $this->Flash->error(__('The second turn of this tournament was started already.'));
         return $this->redirect(['action' => 'index', $tournament->product_id]);
     }
     //pega os usuários classificaos
     if ($tournament->format == 'roundrobin_knockout') {
         $users = TableRegistry::get('Roundrobin')->find()->select(['user_id'])->where(['tournament_id' => $id])->limit($tournament->amount_ranked)->order(['points DESC, victories DESC, goals_pro DESC']);
         foreach ($users as $user) {
             $players[] = $user->user_id;
         }
     } elseif ($tournament->format == 'groups_knockout') {
         if ($tournament->number_of_groups == 2) {
             $groupsCount = 2;
         } else {
             $groupsCount = $this->checkNumberOfGrupos($tournament->amount_team);
         }
         for ($group = 0; $group < $groupsCount; $group++) {
             $users[$group] = TableRegistry::get('Roundrobin')->find()->select(['user_id'])->where(['tournament_id' => $id, 'group_key' => $group])->limit($tournament->amount_ranked)->order(['points DESC, victories DESC, (goals_pro-goals_against) DESC, goals_pro DESC']);
         }
         foreach ($users as $groups) {
             foreach ($groups as $user) {
                 $rankedPlayers[] = $user->user_id;
             }
         }
         $rankedPlayersInOrder = TableRegistry::get('Roundrobin')->find()->select(['user_id'])->where(['tournament_id' => $id, 'user_id IN' => $rankedPlayers])->order(['points DESC, victories DESC, goals_pro - goals_against DESC, goals_pro DESC'])->toArray();
         foreach ($rankedPlayersInOrder as $user) {
             $players[] = $user->user_id;
         }
     }
     $usersToEmail = TableRegistry::get('Users')->find()->where(['Users.id IN' => $players])->toArray();
     foreach ($usersToEmail as $user) {
         if ($user['notification']) {
             $email = new Email('korujafc');
             $about = '[KorujaFC] Sua competição foi para a etapa final!';
             $message = '<img src="http://www.korujafc.com/img/logo.png" alt="logo">
                     <h3>Olá,</h3>
                     <p>A competição ' . $tournament->name . ' foi para a etapa final! Acesse e confira seus jogos clicando abaixo:<a href="http://www.korujafc.com/tournaments/' . $tournament->format . '/' . $id . '">VER JOGOS</a></p>
                     <spam><i>2016 / <a href="http://www.korujafc.com">KORUJAFC.COM</a></i></spam>';
             $email->emailFormat('html')->to($user['email'])->subject($about)->send($message);
         }
     }
     if ($tournament->final_format == 'best_against_worse') {
         $games = $this->knockoutGenerator($players, $tournament, true, true);
     } else {
         sort($players);
         $games = $this->knockoutGenerator($players, $tournament, true);
     }
     $this->saveRoundrobinOrKnockoutGames($games);
     $this->set('tournament', $tournament);
     $this->Flash->success(__('Seconde turn started.'));
     return $this->redirect(['action' => 'index', $tournament->product_id]);
 }
开发者ID:albertoneto,项目名称:localhost,代码行数:66,代码来源:TournamentsController.php


注:本文中的Cake\Network\Email\Email::emailFormat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。