PHP Интерфейс Inpsyde\MultilingualPress\Module\ModuleManager

С версии: 3.0.0
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
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 = self::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.

Описание методов

activate_module() публичный метод

Activates the module with the given ID.
С версии: 3.0.0
public activate_module ( string $id ) : Module
$id string Module ID.
Результат Module Module object.

deactivate_module() публичный метод

Deactivates the module with the given ID.
С версии: 3.0.0
public deactivate_module ( string $id ) : Module
$id string Module ID.
Результат Module Module object.

get_module() публичный метод

Returns the module with the given ID.
С версии: 3.0.0
public get_module ( string $id ) : Module
$id string Module ID.
Результат Module Module object.

get_modules() публичный метод

Returns all modules with the given state.
С версии: 3.0.0
public get_modules ( integer $state = self::MODULE_STATE_ALL ) : Module[]
$state integer Optional. State of the modules. Defaults to all modules.
Результат Module[] Array of module objects.

has_module() публичный метод

Checks if the module with the given ID has been registered.
С версии: 3.0.0
public has_module ( string $id ) : boolean
$id string Module ID.
Результат boolean Whether or not the module with the given ID has been registered.

has_modules() публичный метод

Checks if any modules have been registered.
С версии: 3.0.0
public has_modules ( ) : boolean
Результат boolean Whether or not any modules have been registered.

is_module_active() публичный метод

Checks if the module with the given ID is active.
С версии: 3.0.0
public is_module_active ( string $id ) : boolean
$id string Module ID.
Результат boolean Whether or not the module with the given ID is active.

register_module() публичный метод

Registers the given module.
С версии: 3.0.0
public register_module ( Module $module ) : boolean
$module Module Module object.
Результат boolean Whether or not the module is active.

save_modules() публичный метод

Saves the modules persistently.
С версии: 3.0.0
public save_modules ( ) : boolean
Результат boolean Whether or not the modules were saved successfully.

unregister_module() публичный метод

Unregisters the module with the given.
С версии: 3.0.0
public unregister_module ( string $id ) : Module[]
$id string Module ID.
Результат Module[] Array of all registered module objects.