Trait used as the basic logic for module management
Two classes use this trait, Hm_Handler_Modules and Hm_Output_Modules. These are the interfaces module sets use (indirectly) to interact with a request and produce output to the browser.
| Methods | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public
static
|
load(array $mod_list): void
Load a complete formatted module list
Load a complete formatted module list Parameters
|
# | ||||||||||||||
public
static
|
set_source(string $source): void
Assign the module set name
Assign the module set name Parameters
|
# | ||||||||||||||
public
static
|
add_to_all_pages(string $module, bool $logged_in, string $marker, string $placement, string $source): void
Add a module to every defined page
Add a module to every defined page Parameters
|
# | ||||||||||||||
public
static
|
add(
string $page,
string $module,
bool $logged_in,
string $marker = false,
string $placement = 'after',
bool $queue = true,
string $source = false,
): bool
Add a module to a single page
Add a module to a single page Parameters
Returnstrue if the module was added or was already registered |
# | ||||||||||||||
public
static
|
replace(string $target, string $replacement, string $page = false, string $source = false): void
Replace an already assigned module with a different one
Replace an already assigned module with a different one Parameters
|
# | ||||||||||||||
public
static
|
del(string $page, string $module): void
Delete a module from the internal list
Delete a module from the internal list Parameters
|
# | ||||||||||||||
public
static
|
get_for_page(string $page): array
Return all the modules assigned to a given page
Return all the modules assigned to a given page Parameters
Returnslist of assigned modules |
# | ||||||||||||||
public
static
|
dump(): array
Return all modules for all pages
Return all modules for all pages Returnslist of all modules |
# | ||||||||||||||