SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class TreeAdminController

Any controller which is essentially a tree-based structure of nodes and sub-nodes.

Required fields for a tree controller table:
  id
  name
  parent_id
  record_order

Functions

NameVisibilityDescription
__constructpublicConstructor
_addPreRenderprotectedPre-render hook for adding
_deleteSavepublicDeletes an item and logs the deleted data
_editPreRenderprotectedPre-render hook for editing
_extraOrganisepublicTree organisation tool
_getDeleteFormpublicReturn HTML which represents the form for deleting a record
_getNavigationpublicReturns the contents of the navigation pane for the tree
_getToolspublicReturns the tools to show in the left navigation
filetreeClosepublicSaves in the session data the currently open items in navigation tree
filetreeOpenpublicReturns the children for a specific item, in a format required by jqueryFileTree.
fixRecordOrderprotectedIf the specified item needs a record number to be set,
organiseActionpublicSave tree organise form submission, see self::_extraOrganise
reorderpublicShows the reorder screen (which is shown in a popup box) for re-ordering the children items
reorderSavepublicSaves a tree reorder
reorderToppublicShows the reorder screen (which is shown in a popup box) for re-ordering the top-level stuff

public __construct

void $TreeAdminController->__construct ( );

Constructor

protected _addPreRender

void $TreeAdminController->_addPreRender ( mixed $view );

Pre-render hook for adding

public _deleteSave

bool $TreeAdminController->_deleteSave ( int $item_id [, int $depth [, int $log_id ]] );

Deletes an item and logs the deleted data

protected _editPreRender

void $TreeAdminController->_editPreRender ( mixed $view , mixed $item_id );

Pre-render hook for editing

public _extraOrganise

unknown $TreeAdminController->_extraOrganise ( );

Tree organisation tool
Bulk renaming, reordering and reparenting

public _getDeleteForm

array $TreeAdminController->_getDeleteForm ( int $item_id );

Return HTML which represents the form for deleting a record

public _getNavigation

unknown $TreeAdminController->_getNavigation ( );

Returns the contents of the navigation pane for the tree

public _getTools

unknown $TreeAdminController->_getTools ( );

Returns the tools to show in the left navigation

public filetreeClose

void $TreeAdminController->filetreeClose ( );

Saves in the session data the currently open items in navigation tree
Uses the POST param 'dir', and is usually run through an AJAX call.

public filetreeOpen

void $TreeAdminController->filetreeOpen ( );

Returns the children for a specific item, in a format required by jqueryFileTree.
Uses the POST param 'dir', and is usually run through an AJAX call.

protected fixRecordOrder

void $TreeAdminController->fixRecordOrder ( int $item_id );

If the specified item needs a record number to be set,
Puts this item at the end of the list.

public organiseAction

void $TreeAdminController->organiseAction ( );

Save tree organise form submission, see self::_extraOrganise

public reorder

void $TreeAdminController->reorder ( mixed $id );

Shows the reorder screen (which is shown in a popup box) for re-ordering the children items

public reorderSave

void $TreeAdminController->reorderSave ( mixed $parent_id );

Saves a tree reorder

public reorderTop

void $TreeAdminController->reorderTop ( );

Shows the reorder screen (which is shown in a popup box) for re-ordering the top-level stuff

Tags:   module-api   api