本文整理匯總了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);
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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);
}
}