本文整理汇总了PHP中Mage_Core_Controller_Request_Http::isAjax方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Controller_Request_Http::isAjax方法的具体用法?PHP Mage_Core_Controller_Request_Http::isAjax怎么用?PHP Mage_Core_Controller_Request_Http::isAjax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Controller_Request_Http
的用法示例。
在下文中一共展示了Mage_Core_Controller_Request_Http::isAjax方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _parseInRoleUsersFilter
/**
* Parse $_inRoleUsersFilter value from request
*
* @param Mage_Core_Controller_Request_Http $request
* @param Mage_Backend_Helper_Data $backendHelper
* @return int
*/
protected function _parseInRoleUsersFilter(Mage_Core_Controller_Request_Http $request, Mage_Backend_Helper_Data $backendHelper)
{
$result = self::IN_ROLE_USERS_ANY;
$filter = $backendHelper->prepareFilterString($request->getParam('filter', ''));
if (isset($filter[self::IN_ROLE_USERS_PARAMETER])) {
$result = $filter[self::IN_ROLE_USERS_PARAMETER] ? self::IN_ROLE_USERS_YES : self::IN_ROLE_USERS_NO;
} elseif (!$request->isAjax()) {
$result = self::IN_ROLE_USERS_YES;
}
return $result;
}
示例2: testIsAjax
public function testIsAjax()
{
$this->assertFalse($this->_model->isAjax());
$this->_model->setParam('isAjax', 1);
$this->assertTrue($this->_model->isAjax());
}
示例3: update
/**
* Update system data for current VDE environment
*
* @param string $areaCode
* @param Mage_Core_Controller_Request_Http $request
* @param Mage_Core_Controller_Varien_ActionAbstract $controller
*/
public function update($areaCode, Mage_Core_Controller_Request_Http $request, Mage_Core_Controller_Varien_ActionAbstract $controller)
{
$handle = $request->getParam('handle', '');
if (empty($handle)) {
$mode = self::MODE_NAVIGATION;
if (!$request->isAjax()) {
$this->_backendSession->setData(self::CURRENT_HANDLE_SESSION_KEY, $controller->getFullActionName());
$this->_backendSession->setData(self::CURRENT_URL_SESSION_KEY, $request->getPathInfo());
}
} else {
$mode = self::MODE_DESIGN;
}
$this->_backendSession->setData(self::CURRENT_MODE_SESSION_KEY, $mode);
$this->_injectUrlModel($mode);
$this->_injectLayout($mode, $areaCode);
$this->_injectLayoutUpdateResourceModel();
$this->_setTheme();
$this->_disableCache();
}