21487 Posts in 5783 Topics by 2621 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 653 Views |
-
obtaining an instance of a controller

21 July 2010 at 11:41am
Hi,
I have a class where I want to be able to get an instance of it's parent's controller class.
In the class' controller, I tried:
$myParent = $this->parent();
but it returns the model. Is there anything similar to $this->parent_controller()? I searched the forums but couldn't find anything or didn't use the correct keywords.
thanks!
Steve -
Re: obtaining an instance of a controller

21 July 2010 at 12:42pm
Any parent function you may need, you can call with:
parent::functionNameHere();
Just like you do in init:
parent::init();
-
Re: obtaining an instance of a controller

21 July 2010 at 8:45pm
thanks ampedup, but I should've been more specific in that I was trying to get the parent object with respect to the folder tree and not the class that it extends from.
| 653 Views | ||
|
Page:
1
|
Go to Top |


