本文整理汇总了PHP中JControllerForm::cancel方法的典型用法代码示例。如果您正苦于以下问题:PHP JControllerForm::cancel方法的具体用法?PHP JControllerForm::cancel怎么用?PHP JControllerForm::cancel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JControllerForm
的用法示例。
在下文中一共展示了JControllerForm::cancel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cancel
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*/
public function cancel($key = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN', true));
$app = JFactory::getApplication();
$context = 'com_jhotelreservation.edit.extraoption';
$result = parent::cancel();
}
示例2: cancel
/**
* Override parent cancel method to reset the add module state.
*/
public function cancel($key = null)
{
// Initialise variables.
$app = JFactory::getApplication();
parent::cancel();
$app->setUserState('com_modules.add.module.extension_id', null);
}
示例3: cancel
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*/
public function cancel($key = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
$app = JFactory::getApplication();
$context = 'com_jbusinessdirectory.edit.managecompanyevent';
$result = parent::cancel();
}
示例4: cancel
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return Boolean True if access level checks pass, false otherwise.
*
* @since 1.6
*/
public function cancel($key = null)
{
$return = parent::cancel($key);
// Redirect to the main page.
$this->setRedirect(JRoute::_('index.php', false));
return $return;
}
示例5: cancel
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*/
public function cancel($key = 'id')
{
$result = parent::cancel($key);
// Redirect to the return page.
$this->setRedirect($this->getReturnPage());
return $result;
}
示例6: cancel
/**
* Override parent cancel method to reset the add module state.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 1.6
*/
public function cancel($key = null)
{
$app = JFactory::getApplication();
$result = parent::cancel();
$app->setUserState('com_modules.add.module.extension_id', null);
$app->setUserState('com_modules.add.module.params', null);
return $result;
}
示例7: cancel
public function cancel($key = null)
{
parent::cancel($key);
$model = $this->getModel();
if ($model->getTempId()) {
$this->setRedirect(JRoute::_('index.php?option=com_rsmembership&view=transactions', false));
}
}
示例8: cancel
/**
*
* cancel the slide save
*/
public function cancel($key = null)
{
//bypass direct saving restrictions
$context = "{$this->option}.edit.{$this->context}";
$recordId = JRequest::getInt("id");
$this->holdEditId($context, $recordId);
parent::cancel($key);
$this->setRedirectToSlides();
}
示例9: cancel
/**
* Override parent cancel method to reset the add module state.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 1.6
*/
public function cancel($key = null)
{
// Initialise variables.
$app = JFactory::getApplication();
$result = parent::cancel();
$app->setUserState('com_modules.add.module.extension_id', null);
$app->setUserState('com_modules.add.module.params', null);
$this->setRedirect(JRoute::_(sprintf('index.php?option=%s&view=modules', RokSprocket_Helper::getRedirectionOption()), false));
return $result;
}
示例10: cancel
public function cancel($key = null)
{
parent::cancel($key = null);
$app = JFactory::getApplication();
$rootCat = JUDirectoryFrontHelperCategory::getRootCategory();
$parent_cat_id = $app->input->getInt('parent_id', $rootCat->id);
$cat_id = $app->input->getInt('id', 0);
if ($cat_id) {
$parent_cat_id = JUDirectoryHelper::getCategoryById($cat_id)->parent_id;
}
$this->setRedirect("index.php?option=com_judirectory&view=listcats&cat_id=" . $parent_cat_id);
}
示例11: cancel
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 1.6
*/
public function cancel($key = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
$app = JFactory::getApplication();
$context = 'com_menus.edit.item';
$result = parent::cancel();
if ($result) {
// Clear the ancillary data from the session.
$app->setUserState($context . '.type', null);
$app->setUserState($context . '.link', null);
}
}
示例12: cancel
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 1.6
*/
public function cancel($key = null)
{
Session::checkToken() or exit(Lang::txt('JINVALID_TOKEN'));
// Initialise variables.
$context = 'com_menus.edit.item';
$result = parent::cancel();
if ($result) {
// Clear the ancillary data from the session.
User::setState($context . '.type', null);
User::setState($context . '.link', null);
}
}
示例13: cancel
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 1.6
*/
public function cancel($key = null)
{
JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN', true));
// Initialise variables.
$app = JFactory::getApplication();
$context = 'com_jhotelreservation.edit.room';
$result = parent::cancel();
if ($result) {
// Clear the ancillary data from the session.
$app->setUserState($context . '.type', null);
$app->setUserState($context . '.link', null);
}
}
示例14: cancel
/**
* Override parent cancel method to reset the add module state.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 1.6
*/
public function cancel($key = null)
{
$app = JFactory::getApplication();
$result = parent::cancel();
$app->setUserState('com_advancedmodules.add.module.extension_id', null);
$app->setUserState('com_advancedmodules.add.module.params', null);
if (!JFactory::getApplication()->isAdmin()) {
$returnUri = $this->input->post->get('return', null, 'base64');
$returnUri = !empty($returnUri) ? base64_decode(urldecode($returnUri)) : JUri::base();
$this->setRedirect($returnUri);
$this->redirect();
}
return $result;
}
示例15: cancel
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
$result = parent::cancel();
$data = $this->input->get("jform", array(), "array");
$view = $data['type'];
switch ($view) {
case "":
$view = $this->view_list;
break;
case "component.admin":
case "component.site":
case "table.admin":
case "table.site":
$view = "component";
break;
default:
break;
}
$this->setRedirect(JRoute::_("index.php?option=com_jdeveloper&view=" . $view . "&id=" . $data["item_id"], false));
return $result;
}