Hello,

Thanks for your reply. And good ideas too :)

Cristian

Yep. In the last release, 0.9.2, we added support to optionally set the
view object in the helper. All you need to do is add an accessor to your
helper. As an example, if you have helper 'foo', and want it to access
helper 'bar':

    class My_Helper_Foo
    {
        public $view;

        public function setView(Zend_View_Interface $view)
        {
            $this->view = $view;
        }

        public function foo()
        {
            // Need access to helper 'bar':
            $tmp = $this->view->bar();

            // Need access to a variable set in the view:
            $baz = $this->view->baz;
        }
    }

Hope that helps answer your question!


Reply via email to