| Navigation | |
| Author | Rich Joslin |
| License | http://communit.as/docs/license |
| See Also | Cts_Controller_Action_Abstract Cts_Controller_Action_Admin |
| Instance Methods | |
| init | Invoked automatically when an instance is created. |
| Actions | |
| edit | Allows editing of a nav link for a certain role. |
| editrole | Edit a role’s set of hardwired navigation links. |
| delete | Delete a nav link for a certain role. |
| moveup | Adjusts the sort order values in a particular group of nav items so the specified item is moved up one higher in the order. |
| 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. |
| Private or Protected Methods | |
| move | Used by moveup and <movedown> in adjusting the sort values for navigation items. |
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.
| id | The ID of the role being edited. |
| nav_items | An array of all nav items (full tree), not just the ones to which this role has access. |
function deleteAction()
Delete a nav link for a certain role. After a successful deletion, the browser is redirected to ‘/role/’ (currently hardcoded).
| delete | Value must be yes or this doesn’t work. |
| nav_id | The id of the link to delete. |
| role_id | The id of the role we’re editing (mainly for redirect purposes). |
| nav_id | The ID of the link to delete from the default_navigation table. |
| pagetitle | The title to put in the H1 header. |
| role_id | The id of the role we’re editing (mainly for redirect purposes). |
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.
| nav_id | The ID of the navigation item to move. |
| parent_id | The ID of the parent of the navigation item to move. |
| role_id | The ID of the role being edited. |
private function move( $request, $adjustment )
Used by moveup and <movedown> in adjusting the sort values for navigation items.
| request | An HTTP Rquest object with a GET request containing the nav_id and role_id URL parameters and optional parent_id URL parameter. |
| adjustment | An integer to use to add or subtract to the current position of the navigation item. |
Invoked automatically when an instance is created.
function init()
Allows editing of a nav link for a certain role.
function editAction()
Edit a role’s set of hardwired navigation links.
function editroleAction()
Delete a nav link for a certain role.
function deleteAction()
Adjusts the sort order values in a particular group of nav items so the specified item is moved up one higher in the order.
function moveupAction()
Used by moveup and movedown in adjusting the sort values for navigation items.
private function move( $request, $adjustment )