Methods summary
public static
|
|
public static
Menu
|
#
load( integer $id )
Retrieve a Menu Object from the database by its id
Retrieve a Menu Object from the database by its id
Parameters
- $id
- the id of the Menu to retrieve from the database
Returns
Menu the requested Menu if it exists else, null
|
public static
boolean
|
#
save( Menu $menu )
save a Menu in the database
save a Menu in the database
Parameters
Returns
boolean true if the save have been correctly done
|
public static
|
#
delete( mixed $menu )
Delete a Menu from the database
Delete a Menu from the database
Parameters
- $menu
- The (Menu) Menu or its (int) id to delete from the database
|
public static
|
|
public static
|
#
disable( Menu $menu )
Disable a menu
Parameters
- $menu
- the menu to disable
|
public static
|
#
move( Menu $menu, integer $block, integer $position = 0, boolean $save = true )
Move a menu into a block and save it. Enable or disable it according to the destination block
Move a menu into a block and save it. Enable or disable it according to the destination block
Parameters
- $menu
- the menu to move
- $block
- the destination block
- $position
- the destination block position
- $save
- if true, save also the menu
|
public static
|
#
set_position( Menu $menu, integer $block_position )
Set the menu position in a block
Set the menu position in a block
Parameters
- $menu
- The menu
- $block_position
- the new position.
|
public static
|
#
change_position( Menu $menu, integer $direction = self::MOVE_UP )
Change the menu position in a block
Change the menu position in a block
Parameters
- $menu
- The menu to move
- $direction
- $diff the direction to move it. positives integers move down, negatives, up.
|
public static
|
#
enable_all( boolean $enable = true )
Enables or disables all menus
Enables or disables all menus
Parameters
- $enable
- if true enables all menus otherwise, disables them
|
public static
|
|
public static
boolean
|
#
add_mini_module( string $module_id, $generate_cache = true )
Add the module named $module mini modules
Add the module named $module mini modules
Parameters
- $module_id
- $module the module name
- $generate_cache
Returns
boolean true if the module has been installed, else, false
|
public static
|
#
delete_mini_module( string $module )
delete the mini module $module
delete the mini module $module
Parameters
- $module
- the mini module name
|
public static
|
#
update_mini_modules_list( boolean $update_cache = true )
Update the mini modules list by adding new ones and delete old ones
Update the mini modules list by adding new ones and delete old ones
Parameters
- $update_cache
- if true it will also regenerate the cache
|
public static
LinksMenu
|
#
website_modules( integer $menu_type = LinksMenu::AUTOMATIC_MENU )
Return a menu with links to modules
Return a menu with links to modules
Parameters
Returns
|
public static
|
#
assign_positions_conditions( Template $template, integer $position )
Assigns the positions conditions for different printing modes
Assigns the positions conditions for different printing modes
Parameters
- $template
- the template to use
- $position
- the menu position
|
public static
integer
|
#
str_to_location( string $str_location )
Convert the string location the int location
Convert the string location the int location
Parameters
- $str_location
- the location
Returns
integer the corresponding location
|