/** * 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); } }
/** * 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); } }