class PurgeDependModule in Purge 7.2
Checks if a module is enabled.
Hierarchy
- class \Purge
- class \PurgeDepend implements PurgeValidateable
- class \PurgeDependModule
- class \PurgeDepend implements PurgeValidateable
Expanded class hierarchy of PurgeDependModule
File
- includes/
purge.class.inc, line 197 - Contains all class and interface definitions for Purge.
View source
class PurgeDependModule extends PurgeDepend {
public $modules = array();
/**
* Constructs a module dependency from an array of module.
*
* @param array $modulenames
*
*/
// public function __construct($module_names) {
// foreach($module_names as $module_name) {
// @TODO: Check if things change and call reconfigure if needed.
// $this->modules[$module_name] = module_exists($module_name);
// }
// }
/**
* Checks if the modules are installed and enabled.
*
* @param string $module_name
*/
public function check_depend($module_name = NULL) {
$pass = 0;
if (!is_null($module_name)) {
$modules = array(
$module_name => 0,
);
}
else {
$modules = $this->modules;
}
foreach ($modules as $module_name => $module_status) {
if (module_exists($module_name)) {
$this->module_status[$module_name] = 1;
$pass = 1;
}
}
return $pass;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | function | Only serialize the static values. | 1 |
PurgeDepend:: |
public | function |
Validates the dependency. Overrides Purge:: |
|
PurgeDependModule:: |
public | property | ||
PurgeDependModule:: |
public | function | Checks if the modules are installed and enabled. |