toxygene / rend

Automatically exported from code.google.com/p/rend
Other
0 stars 0 forks source link

LayoutSelector missing getLayout() method #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add Rend_Controller_Action_Helper_LayoutSelector as a helper
2. when postDispatch of this class is called, it tries calling
$this->getLayout() which doesn't exist

Need to add:
    /**
     * Get the layout object
     *
     * @return Zend_Layout
     */
    public function getLayout()
    {
        if (!$this->_layout) {
            $this->_layout =
$this->_getActionHelper('layout')->getLayoutInstance();
        }
        return $this->_layout;
    }

Was this removed for a reason?

Original issue reported on code.google.com by konrn...@gmail.com on 21 Nov 2008 at 8:14

GoogleCodeExporter commented 9 years ago
Note: The above code, will not fix it. I copied this from an older version of
LayoutSelector action helper

Original comment by konrn...@gmail.com on 21 Nov 2008 at 8:17

GoogleCodeExporter commented 9 years ago
[http://code.google.com/p/rend/source/browse/trunk/source/library/Rend/Controlle
r/Action/Helper/LayoutSelector.php#80
Here's the problem.] Need throw an exception if no layout object has been 
provided.

Original comment by justin.h...@gmail.com on 21 Nov 2008 at 10:22

GoogleCodeExporter commented 9 years ago
Fixed with r313

Original comment by justin.h...@gmail.com on 21 Nov 2008 at 11:00