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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Module detection

Go to End

2 Posts   1419 Views


Community Member, 6 Posts

9 February 2011 at 3:58am

I've worked with SilverStripe on several non-production sites just trying to learn the system. I've created a few modules from scratch and incorporated those within the site with no problem. One thing I have run into several times is needing a way to detect if a particular module is installed.

Is there a "SilverStripe way" of doing this? Something along the lines of Controller::moduleExists('module_name')? It seems like this should be a fairly common need from SS developers so I'm hoping someone has a simple method to do module detection.


Forum Moderator, 1899 Posts

9 February 2011 at 5:26am

how about...

if (ClassInfo::exists('classdefinedinmodule')) {
//module exists, do stuff...