Class

MenuService

Package: PHPBoost\Menu Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Loic ROUCHON horn@phpboost.com Version: PHPBoost 5.2 - last update: 2018 02 02 Since: PHPBoost 2.0 - 2008 11 13 Contributor: Julien BRISWALTER j1.seth@phpboost.com Contributor: Arnaud GENET elenwii@phpboost.com Contributor: mipel mipel@phpboost.com Located at: phpboost/menu/MenuService.class.php

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.

Methods summary
public static
# __static( )
public static Menu[]
# get_menu_list( $class = Menu::MENU__CLASS, $block = Menu::BLOCK_POSITION__ALL, $enabled = Menu::MENU_ENABLE_OR_NOT )
public static unknown_type
# get_menus_map( )
public static Menu
# load( integer $id )

Retrieve a Menu Object from the database by its id

public static boolean
# save( Menu $menu )

save a Menu in the database

public static
# delete( mixed $menu )

Delete a Menu from the database

public static
# enable( Menu $menu )

Enable a menu

public static
# disable( Menu $menu )

Disable a menu

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

public static
# set_position( Menu $menu, integer $block_position )

Set the menu position in a block

public static
# change_position( Menu $menu, integer $direction = self::MOVE_UP )

Change the menu position in a block

public static
# enable_all( boolean $enable = true )

Enables or disables all menus

public static
# generate_cache( )

Generate the cache

public static boolean
# add_mini_module( string $module_id, $generate_cache = true )

Add the module named $module mini modules

public static
# delete_mini_module( string $module )

delete the mini module $module

public static
# update_mini_modules_list( boolean $update_cache = true )

Update the mini modules list by adding new ones and delete old ones

public static
# delete_module_feeds_menus( string $module_id )

Delete all the feeds menus with the this module id

public static LinksMenu
# website_modules( integer $menu_type = LinksMenu::AUTOMATIC_MENU )

Return a menu with links to modules

public static
# assign_positions_conditions( Template $template, integer $position )

Assigns the positions conditions for different printing modes

public static integer
# str_to_location( string $str_location )

Convert the string location the int location

Constants summary
integer MOVE_UP
# -1
integer MOVE_DOWN
# 1
Annonces