Muhammad Ali-9 wrote:
>
> use this
>
> /**
> * FlashMessenger
> *
> * @var Zend_Controller_Action_Helper_FlashMessenger
> */
> protected $_flashMessenger = null;
>
> public function init() {
> $this->_flashMessenger =
> $this->_helper->getHelper('FlashMessenger');
> $this->initView();
> $this->view->messages = $this->_flashMessenger->getMessages();
> }
>
> Thanks
> Ali
>
Umm Ali am I not using that view helper? See my code again
<?php
class App_Controller extends Zend_Controller_Action
{
protected $_redirector;
protected $_flashMessenger = null;
public function init()
{
parent::init();
$this->_flashMessenger =
$this->_helper->getHelper('FlashMessenger');
$this->_redirector = $this->_helper->getHelper('Redirector');
$this->initView();
}
protected function flash($message,$to)
{
$this->_flashMessenger->addMessage($message);
$this->_redirector->gotoUrl($to);
}
protected function setMessages()
{
$this->view->messages = join("
",$this->_flashMessenger->getMessages());
}
public function postDispatch()
{
parent::postDispatch();
$this->setMessages();
}
}
Yet when $this->flash() redirects the view->messages is always empty
Has anyone been able to get a extended controller flashmessenger to work???
I am going back to not using Bootstrap_Bootstrap as it has seriously
hindered my turn around time too much trial and error to figure out what
works the same or not.
Its a bummer I just setup my Hosting Servers to allow use of Zend_Tool and I
cant get anything I have working in older apps to work in newer Zend Tool
apps. Hopefully more tutorials will surface
Eric Haskins
--
View this message in context:
http://www.nabble.com/Extending-Zend_Controller_Action-tp24547887p24802104.html
Sent from the Zend Framework mailing list archive at Nabble.com.