示例#1
0
文件: page.php 项目: stonyyi/anahita
 /**
  * Page post action.
  *
  * @param KCommandContext $context Context parameter
  */
 public function redirect(KCommandContext $context)
 {
     if ($context->action == 'edit' || $context->action == 'add') {
         $context->response->setRedirect(JRoute::_($this->getItem()->getURL() . '&layout=edit'));
     } else {
         return parent::redirect($context);
     }
 }
示例#2
0
文件: note.php 项目: stonyyi/anahita
 /**
  * Page post action.
  *
  * @param KCommandContext $context Context parameter
  */
 public function redirect(KCommandContext $context)
 {
     if ($context->action == 'delete') {
         $context->response->setRedirect(JRoute::_($this->getItem()->owner->getURL()));
     } else {
         return parent::redirect($context);
     }
 }