PHP Class Inpsyde\MultilingualPress\Module\NetworkOptionModuleManager

Since: 3.0.0
Inheritance: implements Inpsyde\MultilingualPress\Module\ModuleManager
Afficher le fichier Open project: inpsyde/multilingual-press

Méthodes publiques

Méthode Description
__construct ( string $option ) Constructor. Sets up the properties.
activate_module ( string $id ) : Module Activates the module with the given ID.
deactivate_module ( string $id ) : Module Deactivates the module with the given ID.
get_module ( string $id ) : Module Returns the module with the given ID.
get_modules ( integer $state = ModuleManager::MODULE_STATE_ALL ) : Module[] Returns all modules with the given state.
has_module ( string $id ) : boolean Checks if the module with the given ID has been registered.
has_modules ( ) : boolean Checks if any modules have been registered.
is_module_active ( string $id ) : boolean Checks if the module with the given ID is active.
register_module ( Module $module ) : boolean Registers the given module.
save_modules ( ) : boolean Saves the modules persistently.
unregister_module ( string $id ) : Module[] Unregisters the module with the given.

Method Details

__construct() public méthode

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( string $option )
$option string The name of the network option used for storage.

activate_module() public méthode

Activates the module with the given ID.
Since: 3.0.0
public activate_module ( string $id ) : Module
$id string Module ID.
Résultat Module Module object.

deactivate_module() public méthode

Deactivates the module with the given ID.
Since: 3.0.0
public deactivate_module ( string $id ) : Module
$id string Module ID.
Résultat Module Module object.

get_module() public méthode

Returns the module with the given ID.
Since: 3.0.0
public get_module ( string $id ) : Module
$id string Module ID.
Résultat Module Module object.

get_modules() public méthode

Returns all modules with the given state.
Since: 3.0.0
public get_modules ( integer $state = ModuleManager::MODULE_STATE_ALL ) : Module[]
$state integer Optional. State of the modules. Defaults to all modules.
Résultat Module[] Array of module objects.

has_module() public méthode

Checks if the module with the given ID has been registered.
Since: 3.0.0
public has_module ( string $id ) : boolean
$id string Module ID.
Résultat boolean Whether or not the module with the given ID has been registered.

has_modules() public méthode

Checks if any modules have been registered.
Since: 3.0.0
public has_modules ( ) : boolean
Résultat boolean Whether or not any modules have been registered.

is_module_active() public méthode

Checks if the module with the given ID is active.
Since: 3.0.0
public is_module_active ( string $id ) : boolean
$id string Module ID.
Résultat boolean Whether or not the module with the given ID is active.

register_module() public méthode

Registers the given module.
Since: 3.0.0
public register_module ( Module $module ) : boolean
$module Module Module object.
Résultat boolean Whether or not the module is active.

save_modules() public méthode

Saves the modules persistently.
Since: 3.0.0
public save_modules ( ) : boolean
Résultat boolean Whether or not the modules were saved successfully.

unregister_module() public méthode

Unregisters the module with the given.
Since: 3.0.0
public unregister_module ( string $id ) : Module[]
$id string Module ID.
Résultat Module[] Array of all registered module objects.