Navigation

Summary
Navigation
AuthorRich Joslin
Licensehttp://communit.as/docs/license
See AlsoCts_Controller_Action_Abstract Cts_Controller_Action_Admin
Instance Methods
initInvoked automatically when an instance is created.
Actions
editAllows editing of a nav link for a certain role.
editroleEdit a role’s set of hardwired navigation links.
deleteDelete a nav link for a certain role.
moveupAdjusts the sort order values in a particular group of nav items so the specified item is moved up one higher in the order.
moveupAdjusts the sort order values in a particular group of nav items so the specified item is moved down one lower in the order.
Private or Protected Methods
moveUsed by moveup and <movedown> in adjusting the sort values for navigation items.

Author

Rich Joslin

Instance Methods

init

function init()

Invoked automatically when an instance is created.  Initializes the current instance.  Initializes the parent object (calls init() on the parent instance).

Actions

edit

function editAction()

Allows editing of a nav link for a certain role.  If no ID is passed in, it is used to create a new link.

editrole

function editroleAction()

Edit a role’s set of hardwired navigation links.  This is not controlling permissions and is not linked to the permissions framework at all.  Just a list of links for each role.

URL Parameters

idThe ID of the role being edited.

View Variables

nav_itemsAn array of all nav items (full tree), not just the ones to which this role has access.

delete

function deleteAction()

Delete a nav link for a certain role.  After a successful deletion, the browser is redirected to ‘/role/’ (currently hardcoded).

HTTP POST Parameters

deleteValue must be yes or this doesn’t work.
nav_idThe id of the link to delete.
role_idThe id of the role we’re editing (mainly for redirect purposes).

View Variables

nav_idThe ID of the link to delete from the default_navigation table.
pagetitleThe title to put in the H1 header.
role_idThe id of the role we’re editing (mainly for redirect purposes).

moveup

function moveupAction()

Adjusts the sort order values in a particular group of nav items so the specified item is moved up one higher in the order.

URL Parameters

nav_idThe ID of the navigation item to move.
parent_idThe ID of the parent of the navigation item to move.
role_idThe ID of the role being edited.

moveup

Adjusts the sort order values in a particular group of nav items so the specified item is moved down one lower in the order.

URL Parameters

nav_idThe ID of the navigation item to move.
parent_idThe ID of the parent of the navigation item to move.
role_idThe ID of the role being edited.

Private or Protected Methods

move

private function move($request,
$adjustment)

Used by moveup and <movedown> in adjusting the sort values for navigation items.

Arguments

requestAn HTTP Rquest object with a GET request containing the nav_id and role_id URL parameters and optional parent_id URL parameter.
adjustmentAn integer to use to add or subtract to the current position of the navigation item.
function init()
Invoked automatically when an instance is created.
function editAction()
Allows editing of a nav link for a certain role.
function editroleAction()
Edit a role’s set of hardwired navigation links.
function deleteAction()
Delete a nav link for a certain role.
function moveupAction()
Adjusts the sort order values in a particular group of nav items so the specified item is moved up one higher in the order.
private function move($request,
$adjustment)
Used by moveup and movedown in adjusting the sort values for navigation items.
Close