IP.Board  3.3.0
recursiveTiers Class Reference

Public Member Functions

 __construct (ipsRegistry $registry, $settings)
 asArray ()
 fetchAllsItemDropDown ($selected_id=array(), $skip_id=array(), $defaultRow=array())
 fetchDirectoriesDropDown ($selected_id, $skip_id=array(), $nodir_text='--Select A Directory--', $nodir_id=0)
 fetchItemByID ($id)
 fetchItemChildren ($root_id, $ids=array())
 fetchItemParents ($root_id, $ids=array())
 getData ($key)
 rebuildTiers ()

Protected Member Functions

 _buildSkinTiers ()
 _buildTiers ()
 _fetchAllsItemDropDown ($root_id, $jump_string="", $depth_guide="", $selected_id, $skip_id=array())
 _fetchDirectoriesDropDown ($root_id, $jump_string="", $depth_guide="", $selected_id, $skip_id=array())

Protected Attributes

 $_customBuildMethod = ''
 $_itemByID = array()
 $_itemCache = array()
 $_sqlFolderFlag = ''
 $_sqlOrder = ''
 $_sqlParentID = ''
 $_sqlPrimaryID = ''
 $_sqlSelect = '*'
 $_sqlTable = ''
 $_sqlTitle = ''
 $_sqlWhere = ''
 $cache
 $caches
 $DB
 $lang
 $member
 $memberData
 $registry
 $request
 $settings

Constructor & Destructor Documentation

__construct ( ipsRegistry registry,
settings 
)

Method constructor

public

Parameters:
objectRegistry Object
arrayArray of settings: [ 'sqlPrimaryID' (the SQL table field for the item ID) 'sqlParentID' (the SQL table field for the parent ID) 'sqlFolderFlag' (the SQL table field that tells if the row is a folder or not *Optional) 'sqlTitle' (the SQL table field for the item title) 'sqlOrder' (the SQL table field(s) to order on or by) 'sqlSelect' (the SQL table select fields (* by default)) 'sqlTable' (the SQL table name) 'sqlWhere' (Any additional 'where' information *Optional) ]
Returns:
void

Member Function Documentation

_buildSkinTiers ( ) [protected]

Custom method to build skin collections tier. Data is already in caches array, so no need to query it.

protected

Returns:
void
_buildTiers ( ) [protected]

Build the in-memory information tiers

protected

Returns:
void
_fetchAllsItemDropDown ( root_id,
jump_string = "",
depth_guide = "",
selected_id,
skip_id = array() 
) [protected]

Return a HTML option list of all items: Internal version

protected

Parameters:
intPrimary ID of entry to drill down from
stringCurrently built option list
stringCurrent depth guage
intPrimary ID selected
arrayArray of IDs to skip
Returns:
string
_fetchDirectoriesDropDown ( root_id,
jump_string = "",
depth_guide = "",
selected_id,
skip_id = array() 
) [protected]

Return a HTML option list of directories: Internal version

protected

Parameters:
intPrimary ID of entry to drill down from
stringCurrently built option list
stringCurrent depth guage
intPrimary ID selected
arrayArray of IDs to skip
Returns:
array
asArray ( )

Return all tier data as an array

public

Returns:
array
fetchAllsItemDropDown ( selected_id = array(),
skip_id = array(),
defaultRow = array() 
)

Return a HTML option list of all items: Internal version

public

Parameters:
arrayArray of selected IDs
arrayArray of IDs to skip
array[Optional: Default row array (value, name). Eg: array( '0', 'None' )
Returns:
string
fetchDirectoriesDropDown ( selected_id,
skip_id = array(),
nodir_text = '--Select A Directory--',
nodir_id = 0 
)

Return a HTML option list of directories

public

Parameters:
intSelected ID (shows that item by default in the drop down list)
arrayArray of primary IDs to skip (miss from the listing
stringText to use at the top of the listing (optional)
intID to use at the top of the listing
Returns:
array
fetchItemByID ( id)

Return a data entry by primary ID

public

Parameters:
intID of the data row to return
Returns:
mixed
fetchItemChildren ( root_id,
ids = array() 
)

Fetches all children of a particular ID

public

Parameters:
intID of the data row to retreive children
arrayArray of IDs discovered. Used when recursing.
Returns:
array Simple array of IDs
fetchItemParents ( root_id,
ids = array() 
)

Fetches all parents of a particular ID

public

Parameters:
intID of the data row to retreive parents
arrayArray of IDs discovered. Used when recursing.
Returns:
array Simple array of IDs
getData ( key)

Returns data

public

Parameters:
string
Returns:
mixed

Rebuild the in-memory information

public

Returns:
void

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables