當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Service::info方法代碼示例

本文整理匯總了PHP中Service::info方法的典型用法代碼示例。如果您正苦於以下問題:PHP Service::info方法的具體用法?PHP Service::info怎麽用?PHP Service::info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Service的用法示例。


在下文中一共展示了Service::info方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: handle

 /**
  * Handle form request.
  *
  * @param \Symfony\Component\Form\FormInterface     $form
  * @param \Symfony\Component\HttpFoundation\Request $request
  *
  * @return bool
  */
 public function handle(FormInterface $form, Request $request)
 {
     $this->logger->info('UserEditFormHandler handle()');
     if (!$request->isMethod('POST')) {
         return false;
     }
     $form->handleRequest($request);
     if (!$form->isValid()) {
         $this->flashManager->getErrorMessage();
         return false;
     }
     $this->userManager->update($form->getData());
     $this->flashManager->getSuccessMessage('update successfully!');
     return true;
 }
開發者ID:sonnybrilliant,項目名稱:real-time-data,代碼行數:23,代碼來源:UserEditHandler.php

示例2: handle

 /**
  * @param FormInterface $form
  * @param Request       $request
  *
  * @return bool
  */
 public function handle(FormInterface $form, Request $request)
 {
     $this->logger->info('MotorCoachCreateHandler handle()');
     if (!$request->isMethod('POST')) {
         return false;
     }
     $form->handleRequest($request);
     if (!$form->isValid()) {
         $this->flashManager->getErrorMessage();
         return false;
     }
     $validMotorCoach = $form->getData();
     $this->motorCoachManager->create($validMotorCoach);
     $this->flashManager->getSuccessMessage('Motor coach was added successfully!');
     return true;
 }
開發者ID:sonnybrilliant,項目名稱:real-time-data,代碼行數:22,代碼來源:MotorCoachCreateHandler.php

示例3: handle

 /**
  * @param FormInterface $form
  * @param Request       $request
  *
  * @return bool
  */
 public function handle(FormInterface $form, Request $request)
 {
     $this->logger->info('TrainEditHandler handle()');
     if (!$request->isMethod('POST')) {
         return false;
     }
     $form->handleRequest($request);
     if (!$form->isValid()) {
         $this->flashManager->getErrorMessage();
         return false;
     }
     $validTrain = $form->getData();
     $this->trainManager->update($validTrain);
     $this->flashManager->getSuccessMessage('Train was updated successfully!');
     return true;
 }
開發者ID:sonnybrilliant,項目名稱:real-time-data,代碼行數:22,代碼來源:TrainEditHandler.php

示例4: handle

 /**
  * Handle form request.
  *
  * @param \Symfony\Component\Form\FormInterface     $form
  * @param \Symfony\Component\HttpFoundation\Request $request
  *
  * @return bool
  */
 public function handle(FormInterface $form, Request $request, User $user)
 {
     $this->logger->info('UserChangePasswordHandler= handle()');
     if (!$request->isMethod('POST')) {
         return false;
     }
     $form->handleRequest($request);
     if (!$form->isValid()) {
         $this->flashManager->getErrorMessage();
         return false;
     }
     $userChangePassword = $form->getData();
     $user->setPassword($userChangePassword->getNewPassword());
     $this->userManager->resetPassword($user);
     $this->flashManager->getSuccessMessage('Your password was changed successfully!');
     return true;
 }
開發者ID:sonnybrilliant,項目名稱:real-time-data,代碼行數:25,代碼來源:UserChangePasswordHandler.php

示例5: getInfoMessage

 /**
  * Get info message.
  *
  * @param String $msg
  */
 public function getInfoMessage($msg)
 {
     $this->logger->info('Service FlashMessageManager getInfoMessage()');
     $this->session->getFlashBag()->add('info', $msg);
     return;
 }
開發者ID:sonnybrilliant,項目名稱:real-time-data,代碼行數:11,代碼來源:FlashMessageManager.php

示例6: send

 /**
  * Send email.
  *
  * @param array $email
  */
 private function send($email)
 {
     $this->logger->info('NewAccountCreatedListener send()');
     $message = \Swift_Message::newInstance()->setSubject($email['subject'])->setFrom(array($this->fromEmailAddress => $this->fromName))->setTo($email['emailAddress'])->setBody($email['bodyHTML'], 'text/html')->addPart($email['bodyTEXT'], 'text/plain');
     $this->mailer->send($message);
 }
開發者ID:sonnybrilliant,項目名稱:real-time-data,代碼行數:11,代碼來源:NewAccountCreatedListener.php

示例7: onTrainAssign

 /**
  * On train assign event, update motor coach
  *
  * @param MotorCoachEvent $motorCoach
  */
 public function onTrainAssign(MotorCoachEvent $motorCoach)
 {
     $this->logger->info('Event listener OnMotorCoachAssignListener onTrainAssign()');
     $this->motorCoachManager->update($motorCoach->getMotorCoach());
 }
開發者ID:sonnybrilliant,項目名稱:real-time-data,代碼行數:10,代碼來源:OnMotorCoachAssignListener.php


注:本文中的Service::info方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。