Checks if a module is enabled. A given module will only be returned
if it meets the following criteria: it is enabled, it is assigned to
the current menu item or all items, and the user meets the access level
requirements.
Parameters
- string $module The module name
Returns
- bool See description for conditions.
Since
/**
* Checks if a module is enabled. A given module will only be returned
* if it meets the following criteria: it is enabled, it is assigned to
* the current menu item or all items, and the user meets the access level
* requirements.
*
* @param string $module The module name
*
* @return boolean See description for conditions.
*
* @since 1.5
*/
public static function isEnabled($module)
{
$result = static::getModule($module);
return $result !== null && $result->id !== 0;
}