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


PHP Service::getErrorMessage方法代码示例

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


在下文中一共展示了Service::getErrorMessage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


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