21489 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 409 Views |
-
Test for presence of module or fields

2 November 2011 at 2:06pm
Hi,
Is there a conventional way of testing for the presence of Module or specific fields that a module might create?
Thanks very much.
VWD.
-
Re: Test for presence of module or fields

2 November 2011 at 9:43pm
You can check if a class exists by doing this:
if (class_exists('MyClass')) {
$myclass = new MyClass();
}
So you could check for a known class in the module and then assume that the module is installed - maybe not ideal... -
Re: Test for presence of module or fields

3 November 2011 at 11:27am
Thanks @Howard, that'll do the trick.
So there isn't a Sapphire API to test for the presence of a module or widget?
Thanks again.
VWD
| 409 Views | ||
|
Page:
1
|
Go to Top |

