21294 Posts in 5734 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 852 Views |
-
Module detection

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.
-
Re: Module detection

9 February 2011 at 5:26am
how about...
if (ClassInfo::exists('classdefinedinmodule')) {
//module exists, do stuff...
}
| 852 Views | ||
|
Page:
1
|
Go to Top |

