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


PHP Vtiger_Request::isAjax方法代碼示例

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


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

示例1: process

 public function process(Vtiger_Request $request)
 {
     if ($request->isAjax()) {
         $moduleModelList = Settings_PickListDependency_Module_Model::getPicklistSupportedModules();
         $forModule = $request->get('formodule');
         $viewer = $this->getViewer($request);
         $viewer->assign('PICKLIST_MODULES_LIST', $moduleModelList);
         $viewer->assign('FOR_MODULE', $forModule);
         $viewer = $this->getViewer($request);
         $this->initializeListViewContents($request, $viewer);
         $viewer->view('ListViewHeader.tpl', $request->getModule(false));
     }
     parent::process($request);
 }
開發者ID:Bergdahls,項目名稱:YetiForceCRM,代碼行數:14,代碼來源:List.php

示例2: getViewer

 function getViewer(Vtiger_Request $request)
 {
     if (!$this->viewer) {
         $viewer = Vtiger_Viewer::getInstance();
         $viewer->assign('APPTITLE', getTranslatedString('APPTITLE'));
         $viewer->assign('YETIFORCE_VERSION', vglobal('YetiForce_current_version'));
         if ($request->isAjax()) {
             $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
             if ($request->get('parent') == 'Settings') {
                 $viewer->assign('QUALIFIED_MODULE', $request->getModule(false));
             }
         }
         $this->viewer = $viewer;
     }
     return $this->viewer;
 }
開發者ID:reeid,項目名稱:YetiForceCRM,代碼行數:16,代碼來源:Controller.php

示例3: throwNewException

 public static function throwNewException($message, $die = true, $tpl = 'OperationNotPermitted.tpl')
 {
     $request = new Vtiger_Request($_REQUEST);
     if ($request->isAjax()) {
         $response = new Vtiger_Response();
         $response->setEmitType(Vtiger_Response::$EMIT_JSON);
         $response->setError($message);
         $response->emit();
     } else {
         $viewer = new Vtiger_Viewer();
         $viewer->assign('MESSAGE', $message);
         $viewer->view($tpl, 'Vtiger');
     }
     if ($die) {
         exit;
     }
 }
開發者ID:reeid,項目名稱:YetiForceCRM,代碼行數:17,代碼來源:Functions.php

示例4: throwNoPermittedException

 public static function throwNoPermittedException($message, $die = true)
 {
     $request = new Vtiger_Request($_REQUEST);
     $db = PearDatabase::getInstance();
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $db->insert('s_yf_accesstorecord', ['username' => $currentUser->getDisplayName(), 'date' => date('Y-m-d H:i:s'), 'ip' => self::getRemoteIP(), 'record' => $request->get('record'), 'module' => $request->get('module'), 'url' => Vtiger_Functions::getBrowserInfo()->url, 'description' => '', 'agent' => $_SERVER['HTTP_USER_AGENT']]);
     if ($request->isAjax()) {
         $response = new Vtiger_Response();
         $response->setEmitType(Vtiger_Response::$EMIT_JSON);
         $response->setError($message);
         $response->emit();
     } else {
         $viewer = new Vtiger_Viewer();
         $viewer->assign('MESSAGE', $message);
         $viewer->view('NoPermissionsForRecord.tpl', 'Vtiger');
     }
     if ($die) {
         exit;
     }
 }
開發者ID:rcrrich,項目名稱:YetiForceCRM,代碼行數:20,代碼來源:Functions.php

示例5: throwNewException

 static function throwNewException($message)
 {
     $request = new Vtiger_Request($_REQUEST);
     if ($request->isAjax()) {
         $response = new Vtiger_Response();
         $response->setEmitType(Vtiger_Response::$EMIT_JSON);
         $response->setError($message);
         $response->emit();
     } else {
         $viewer = new Vtiger_Viewer();
         $viewer->assign('MESSAGE', $message);
         $text = $viewer->view('OperationNotPermitted.tpl', 'Vtiger', true);
         die($text);
     }
 }
開發者ID:vovpff,項目名稱:YetiForceCRM,代碼行數:15,代碼來源:Functions.php


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