Get an entity from a specific module.
$module = Module::find('blog');
Get module name.
$module->getName();
Get module name in lowercase.
$module->getLowerName();
Get module name in studlycase.
$module->getStudlyName();
Get module path.
$module->getPath();
Get extra path.
$module->getExtraPath('Assets');
Disable the specified module.
$module->disable();
Enable the specified module.
$module->enable();
Check if enabled:
$module->isEnabled();
Check if disabled:
$module->isDisabled);
Check if the status it true or false by passing true or false:
$module->IsStatus(false); //returns true if active false if is not active
You can also do a call in one go:
Module::find('Posts')->isEnabled();
Only run the one liner if you've first checked the module exists otherwise you will get an error.
Delete the specified module.
$module->delete();
Get an array of module requirements. Note: these should be aliases of the module.
$module->getRequires();