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


PHP BaseController::ajaxCallback方法代碼示例

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


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

示例1: ajaxCallback

 protected function ajaxCallback()
 {
     // Transfere callback para métodos respectivos
     switch ($this->action) {
         case 'detail':
             $json = $this->ajaxCallbackForProductApproval();
             break;
         default:
             $json = parent::ajaxCallback();
             break;
     }
     header('Content-Type: application/json');
     exit(json_encode($json));
 }
開發者ID:sohflp,項目名稱:Hooked,代碼行數:14,代碼來源:class.Order.php

示例2: ajaxCallback

 protected function ajaxCallback()
 {
     // Transfere callback para métodos respectivos
     switch ($this->action) {
         case 'faqSearch':
             $json = $this->ajaxCallbackForSearch();
             break;
         case 'faqDetail':
             $json = $this->ajaxCallbackForDetail();
             break;
         case 'faqRemove':
             $json = $this->ajaxCallbackForRemove();
             break;
         default:
             $json = parent::ajaxCallback();
             break;
     }
     header('Content-Type: application/json');
     exit(json_encode($json));
 }
開發者ID:sohflp,項目名稱:Hooked,代碼行數:20,代碼來源:class.Content.php

示例3: ajaxCallback

 protected function ajaxCallback()
 {
     // Transfere callback para métodos respectivos
     switch ($this->action) {
         case 'typeSearch':
         case 'brandSearch':
         case 'messageSearch':
             $json = $this->ajaxCallbackForSearch();
             break;
         case 'detail':
             $json = $this->ajaxCallbackForProductApproval();
             break;
         case 'messageDetail':
             $json = $this->ajaxCallbackForMessageApproval();
             break;
         case 'typeDetail':
             $json = $this->ajaxCallbackForDetail();
             if ($json['newID']) {
                 $json['disable'] = ['parent'];
                 $json['hide'] = ['messageContainer'];
                 $json['show'] = ['featureContainer'];
             }
             break;
         case 'typeNewFeature':
             $json = $this->ajaxCallbackForNewFeature();
             break;
         case 'brandDetail':
             $json = $this->ajaxCallbackForPhoto();
             break;
         case 'typeRemove':
         case 'brandRemove':
         case 'messageRemove':
             $json = $this->ajaxCallbackForRemove();
             break;
         default:
             $json = parent::ajaxCallback();
             break;
     }
     header('Content-Type: application/json');
     exit(json_encode($json));
 }
開發者ID:sohflp,項目名稱:Hooked,代碼行數:41,代碼來源:class.Product.php

示例4: ajaxCallback

 protected function ajaxCallback()
 {
     // Transfere callback para métodos respectivos
     switch ($this->action) {
         case 'mySales':
         case 'myPurchases':
             $json = $this->ajaxCallbackForSearch();
             break;
         default:
             $json = parent::ajaxCallback();
             break;
     }
     header('Content-Type: application/json');
     exit(json_encode($json));
 }
開發者ID:sohflp,項目名稱:Hooked,代碼行數:15,代碼來源:class.Order.php

示例5: ajaxCallback

 protected function ajaxCallback()
 {
     // Inicializa variáveis do JSON
     $json['redirect'] = null;
     // Transfere callback para métodos respectivos
     switch ($this->action) {
         case 'web':
             switch ($this->authenticate($_POST)) {
                 case Config::read('authcode.error.userdata'):
                     // Dados inválidos
                     $json['message'] = Text::alertMessage("danger", Text::read('message.login.error.data'));
                     break;
                 case Config::read('authcode.error.blocked'):
                     // Usuário inativo
                     $json['message'] = Text::alertMessage("warning", Text::read('message.login.error.inactive'));
                     break;
                 case Config::read('authcode.error.mandatory'):
                     // Campos obrigatórios
                     $json['message'] = Text::alertMessage("danger", Text::read('message.login.error.mandatory'));
                     break;
                 default:
                     $json['redirect'] = Config::read('page.url.homepage');
                     break;
             }
             break;
         case 'myAccount':
         case 'newAccount':
             $json = $this->ajaxCallbackForDetail();
             if ($json['newID']) {
                 $json['redirect'] = Config::read('page.url.login.new-message');
             }
             break;
         case 'password':
             $json = $this->ajaxCallbackForPassword();
             if ($json['newID']) {
                 $json['redirect'] = Config::read('page.url.login.password-message');
             }
             break;
         default:
             $json = parent::ajaxCallback();
             break;
     }
     header('Content-Type: application/json');
     exit(json_encode($json));
 }
開發者ID:sohflp,項目名稱:Hooked,代碼行數:45,代碼來源:class.Login.php


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