本文整理汇总了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);
}
}