当前位置: 首页>>代码示例>>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;未经允许,请勿转载。