Hello I am trying to use the GetPreviousControllerName on the Phalcon dispatcher in order to retrieve the last controller name. This however returns my baseController and not the child that extends the base. Here is a small example:
From
class TestController extends BaseController
{
//Calls an action on the base class
//On error
$this->dispatcher->setParam("message", "Failure!!");
$this->dispatcher->setParam("Id", 1234);
$this->dispatcher->forward(array("controller" => "general", "action" => "errorConfirmation"));
}
Going To
class GeneralController extends BaseController
{
public function errorConfirmationAction()
{
// show error then return to
$this->view->setVar("link", $this->dispatcher->getPreviousControllerName() . "/view/" . $Id);
}
}
This returns Base/view/1234
I need it to return Test/View/1234 is this possible?