Namespaces | Functions

cms/menu.lib.php File Reference

Go to the source code of this file.

Namespaces

namespace  pragyan
 

Widget Framework for Pragyan CMS (c) 2010 Pragyan Team http://www.gnu.org/licenses/ GNU Public License For more details, see README Add support for File Upload/Download via the widget's configurations Reload Widgets ,Get Widget Instances. see bottom.


Functions

 findMenuIndex ($menuArray, $pageId)
 getMenu ($userId, $pageIdArray)
 getChildList ($pageId, $depth, $rootUri, $userId, $curdepth)
 htmlMenuRenderer ($menuArray, $currentIndex=-1, $linkPrefix= '')
 imageMenuRenderer ($menuArray, $currentIndex=-1, $linkPrefix= '')
 getChildren ($pageId, $userId)

Function Documentation

findMenuIndex ( menuArray,
pageId 
)

Definition at line 24 of file menu.lib.php.

getChildList ( pageId,
depth,
rootUri,
userId,
curdepth 
)

Get the ChildList for the current item in menu.

Parameters:
$pageId the page Id of the current Page
$depth The number of levels of menu that should be generated
$userId The viewers id - To check for permissions.
Returns:
Associative Array containing the child pages informaion.;

Definition at line 172 of file menu.lib.php.

getChildren ( pageId,
userId 
)
Returns:
Array of arrays of page id, page name, page title, large image and small image

Definition at line 269 of file menu.lib.php.

getMenu ( userId,
pageIdArray 
)

Now $COMPLETEMENU AND $MENUBAR mean the same in /index.php 3rd type of menu added in database - completemenu Function getMenu

Parameters:
userId user Id of the current user logged in.
pageIdArray generate menu for the request page.
Returns:
HTML element of the menu. An unordered list.

This hostURL is to replace all ".(dot)s" with the current address, making the link absolute. hostURL() common.lib.php - http://pragyan.org/11 selfURI() common.lib.php - http://pragyan.org/11/home/how_to_use/mypage/mypage2

A duplicate entry just a fix for changing $hostURL.

Returns an array

Default depth is 1 - Should always show atleast one level of sub menu to enable navigation within site.

Classic Menu type - No branches are displayed in this type

Get parent page details

Display the sibling menu of the same depth

Icon for the menu if present

If nothing is generated, then display atleast one item - the current Menu

If the childList is generated, then display the child items

Multi Depth Menu Code starts from here

Get page information through pageId

Get the Children of the page.

If nothing generated, then display default - The current page name

Definition at line 42 of file menu.lib.php.

htmlMenuRenderer ( menuArray,
currentIndex = -1,
linkPrefix = '' 
)

Definition at line 211 of file menu.lib.php.

imageMenuRenderer ( menuArray,
currentIndex = -1,
linkPrefix = '' 
)

Definition at line 238 of file menu.lib.php.