Cuppa Documentation

Find information related with: installation, user interface, best practices, improve and extend de functionalities, front-end integration and more.
Menu

get($menu_name, $condition = "", $user_validate_permissions = true, $language_file_name = "administrator", $init_id_reference = 0, $include_init_reference = false )

$menu = $cuppa->menu->get('web'); // return the menu with the web name like a array data
$menu = $cuppa->menu->get('web', 'enabled = 1'); // return the menu with the web name like a array data
$menu = $cuppa->menu->get('web', '', true, 'web', 3);
   
// return the menu with the next characteristics
   
menu_name = web  // get the menu web
   
user_validate_permissions = true   // valid the permissions
   
language_file_name = 'web'   // load the file web, and translate the content 
   
init_id_reference = 3 // get the menu starting the node with id 3

getList($menu_name, $user_validate_permissions = true, $language_file_name = "administrator", $include_language = false )

$menu = $cuppa->menu->getList('web'); // return the menu like a HTML list <ul><li>

getInfo($menu, $reference, $language_file_reference = "administrator", $object_return = true )

$info = $cuppa->menu->getInfo('web', 5); / / return the info about the item with the id 5
$info = $cuppa->menu->getInfo('web', 'news'); // return the info about the item with the alias 'news'

getChildrens($menu, $reference, $language_file_reference = "administrator", $object_return = true )

$items = $cuppa->menu->getChildrens('web', 3); // return the child of the item with id 3