Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Using add_extension() to extend Controller functionality


Go to End


1959 Views

Avatar
jhirm

Community Member, 21 Posts

27 April 2009 at 11:21pm

I want to extend the functionality of a Controller using Object::add_extension(), and am not quite sure how to go about it. I'd like to override the PageController's init() function to add some security logic, but I'm not able to use methods defined in PageController in my extension because it inherits from Extension instead of PageController...

Any ideas? Or can someone point me to some documentation that might be useful?

Thanks.