You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pha...@googlegroups.com
Greetings!
I have a problem when using phalcon.
In initialize method of a controller , I do something like checking data, then deal with the left job, or send a redirect by controller->response->redirect method if something goes wrong.
But the dispatcher still run with the request at begin and output the page.
Although I could add a controller->forward('empty/action/do_nothing') after redirect method , but if there a nice way to finish the request immediately ?
Igor Ivanovic
unread,
Feb 25, 2013, 4:02:19 AM2/25/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pha...@googlegroups.com
$this->request->redirect('empty/action/do_nothing')
Will redirect you to your action.
$this->dispatcher->forward('empty/action/do_nothing');
This will forward you to your action without redirection
понедельник, 25 февраля 2013 г., 14:08:44 UTC+4 пользователь kimjxie написал:
kimjxie
unread,
Feb 25, 2013, 5:35:06 AM2/25/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pha...@googlegroups.com
sorry for not emphasizing the point:
I use $this->response->redirect in initialize metod of a controller,
May be the question is clearer by asking as : How to finish the dispatcher and response immediately in \Phalcon\Mvc\Controller::initialize method, or I should not do like this?
Igor Ivanovic
unread,
Feb 25, 2013, 5:38:28 AM2/25/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pha...@googlegroups.com
You can stop rendering like this:
$this->view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_NO_RENDER);