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


PHP ActionController::getErrorFlashMessage方法代碼示例

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


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

示例1: getErrorFlashMessage

 /**
  * Looks for form error message in localization file.
  *
  * First tries 'form-errors-{controller}-{action}', then
  * tries 'form-errors-{controller}' for translation.
  *
  * {controller} and {action} are lowercase
  *
  * @return NULL|string
  */
 protected function getErrorFlashMessage()
 {
     $action = strtolower($this->request->getControllerActionName());
     $controller = strtolower($this->request->getControllerName());
     $ext = $this->request->getControllerExtensionName();
     $message = LocalizationUtility::translate("form-errors-{$controller}-{$action}", $ext);
     if ($message) {
         return $message;
     }
     $message = LocalizationUtility::translate("form-errors-{$controller}", $ext);
     if ($message) {
         return $message;
     }
     return parent::getErrorFlashMessage();
 }
開發者ID:electricretina,項目名稱:cicbase,代碼行數:25,代碼來源:AbstractController.php

示例2: getErrorFlashMessage

 /**
  * @return string
  */
 protected function getErrorFlashMessage()
 {
     $getValidationResults = $this->arguments->getValidationResults();
     if ($getValidationResults->hasErrors()) {
         $errorMsg = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('tx_cart.error.validation', $this->extensionName);
     } else {
         $errorMsg = parent::getErrorFlashMessage();
     }
     return $errorMsg;
 }
開發者ID:extcode,項目名稱:cart,代碼行數:13,代碼來源:CartController.php

示例3: getErrorFlashMessage

 /**
  * Override getErrorFlashMessage to present
  * nice flash error messages.
  *
  * @return string
  */
 protected function getErrorFlashMessage()
 {
     $defaultFlashMessage = parent::getErrorFlashMessage();
     $locallangKey = sprintf('error.%s.%s', lcfirst($this->request->getControllerName()), $this->actionMethodName);
     return $this->translate($locallangKey, $defaultFlashMessage);
 }
開發者ID:dextar1,項目名稱:t3extblog,代碼行數:12,代碼來源:AbstractController.php

示例4: getErrorFlashMessage

 /**
  * Handle default flash messages
  *
  * @return string
  */
 protected function getErrorFlashMessage()
 {
     $msg = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('controller-login-genericActionMessage-' . $this->actionMethodName, 'cicregister');
     if (!$msg) {
         return parent::getErrorFlashMessage();
     }
     return $msg;
 }
開發者ID:busynoggin,項目名稱:cicregister,代碼行數:13,代碼來源:LoginController.php


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