Summary
- File
- Package hierarchy PHPBoost\Menu
- Class hierarchy \MenuService
This service manage kernel menus by adding the persistance to menus objects.
It also provides all moving and disabling methods to change the website appearance.
This service manage kernel menus by adding the persistance to menus objects.
It also provides all moving and disabling methods to change the website appearance.
__static()
| None found |
get_menu_list( $class = \Menu::MENU__CLASS, $block = \Menu::BLOCK_POSITION__ALL, $enabled = \Menu::MENU_ENABLE_OR_NOT) : array<mixed,\Menu>
| $class | ||
| $block | ||
| $enabled |
| None found |
get_menus_map() : \unknown_type
| None found |
load(integer $id) : \Menu
Retrieve a Menu Object from the database by its id
| integer | $id | the id of the Menu to retrieve from the database |
the requested Menu if it exists else, null
| None found |
save(\Menu $menu) : boolean
save a Menu in the database
| \Menu | $menu | The Menu to save |
true if the save have been correctly done
| None found |
delete(mixed $menu)
Delete a Menu from the database
| mixed | $menu | The (Menu) Menu or its (int) id to delete from the database |
| None found |
enable(\Menu $menu)
Enable a menu
| \Menu | $menu | the menu to enable |
| None found |
disable(\Menu $menu)
Disable a menu
| \Menu | $menu | the menu to disable |
| None found |
move(\Menu $menu, integer $block, integer $position, boolean $save = true)
Move a menu into a block and save it. Enable or disable it according to the destination block
| \Menu | $menu | the menu to move |
| integer | $block | the destination block |
| integer | $position | the destination block position |
| boolean | $save | if true, save also the menu |
| None found |
set_position(\Menu $menu, integer $block_position)
Set the menu position in a block
| \Menu | $menu | The menu |
| integer | $block_position | the new position. |
| None found |
change_position(\Menu $menu, $direction = self::MOVE_UP)
Change the menu position in a block
| \Menu | $menu | The menu to move |
| $direction |
| None found |
enable_all(boolean $enable = true)
Enables or disables all menus
| boolean | $enable | if true enables all menus otherwise, disables them |
| None found |
generate_cache()
Generate the cache
| None found |
add_mini_module( $module_id, $generate_cache = true) : boolean
Add the module named $module mini modules
| $module_id | ||
| $generate_cache |
true if the module has been installed, else, false
| None found |
delete_mini_module(string $module)
delete the mini module $module
| string | $module | the mini module name |
| None found |
update_mini_modules_list(boolean $update_cache = true)
Update the mini modules list by adding new ones and delete old ones
| boolean | $update_cache | if true it will also regenerate the cache |
| None found |
delete_module_feeds_menus(string $module_id)
Delete all the feeds menus with the this module id
| string | $module_id | the module id |
| None found |
website_modules(integer $menu_type = \LinksMenu::AUTOMATIC_MENU) : \LinksMenu
Return a menu with links to modules
| integer | $menu_type | the menu type |
the menu with links to modules
| None found |
assign_positions_conditions(\Template $template, integer $position)
Assigns the positions conditions for different printing modes
| \Template | $template | the template to use |
| integer | $position | the menu position |
| None found |
str_to_location(string $str_location) : integer
Convert the string location the int location
| string | $str_location | the location |
the corresponding location
| None found |
build_menu_list_query_conditions(integer $class, \int_type $block, boolean $enabled) : \SQLFragment
| integer | $class | |
| \int_type | $block | |
| boolean | $enabled |
| None found |
get_next_position( $block)
| $block |
| None found |
initialize_menus_map() : array<mixed,array>
initialize the menus map structure
| None found |
initialize(\string[key] $db_result) : \Menu
| \string[key] | $db_result | the map from the database with the Menu id and serialized object |
the menu object from the serialized one
| None found |