LibertyStructure Class Reference

Inheritance diagram for LibertyStructure:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 build_subtree_toc ()
 buildSubtreeToc ($id, $slide=false, $order='asc', $tocPrefix='')
 createSubTree ($pStructureHash, $pParentId=0, $pParentPos= '', $pLevel=0)
 embellishStructureHash (&$pParamHash)
 exportHtml ()
 fetch_toc ()
 fetchToc ($structure_tree, $showdesc, $numbering)
 flattenStructureHash ($pParamHash, $i=-10000)
 get_next_page ()
 get_prev_page ()
 get_toc ()
 getChildNodes ($pStructureHash, $pParentId=0)
 getContentArray ($pStructureId, &$pToc, $pLevel=0)
 getContentIds ($pStructureId, &$pToc, $pLevel=0)
 getList (&$pListHash)
 getNextStructureNode ($structure_id, $deep=true)
 getNode ($pStructureId=NULL, $pContentId=NULL)
 getPath ($pStructureId)
 getPrevStructureNode ($structure_id, $deep=false)
 getRootStructureId (&$pParamHash)
 getRootTitle ()
 getStructure (&$pParamHash)
 getStructureNodes ($pParentId)
 getStructureParentInfo ($structure_id)
 getSubTree ($pStructureId, $pRootTree=FALSE, $pListHash=NULL)
 getToc ($pStructureId=NULL, $order='asc', $showdesc=false, $numbering=true, $numberPrefix='')
 isRootNode ()
 isValid ()
 LibertyStructure ($pStructureId=NULL, $pContentId=NULL)
 load ()
 loadNavigation ()
 loadPath ()
 moveNodeEast ()
 moveNodeNorth ()
 moveNodeSouth ()
 moveNodeWest ()
 removeStructureNode ($structure_id, $delete=FALSE)
 s_get_pages ()
 s_get_parent_info ()
 s_remove_page ()
 setTreeRoot ($pRootId, $pTree)
 storeNode (&$pParamHash)
 storeStructure ($pParamHash)
 verifyNode (&$pParamHash)
 verifyStructure (&$pParamHash)

Public Attributes

 $mStructureId

Detailed Description

Definition at line 20 of file LibertyStructure.php.


Member Function Documentation

LibertyStructure::build_subtree_toc (  ) 

Definition at line 1014 of file LibertyStructure.php.

References buildSubtreeToc().

Here is the call graph for this function:

LibertyStructure::buildSubtreeToc ( id,
slide = false,
order = 'asc',
tocPrefix = '' 
)

buildSubtreeToc

Parameters:
array $id
array $slide
string $order
string $tocPrefix can be used to Prefix a subtree as it would start from a given number (e.g. 2.1.3) public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 796 of file LibertyStructure.php.

References $contentTypes, $gBitSystem, $gLibertySystem, $prefix, $query, $res, $result, $type, mDb, mPackages, and title.

Referenced by build_subtree_toc(), and getToc().

LibertyStructure::createSubTree ( pStructureHash,
pParentId = 0,
pParentPos = '',
pLevel = 0 
)

Create a usable array from the data in the database from getStructure()

Parameters:
$pStructureHash raw structure data from database
Returns:
nicely formatted and cleaned up structure array

Definition at line 275 of file LibertyStructure.php.

References $r, $ret, FALSE, and getChildNodes().

Referenced by getSubTree().

Here is the call graph for this function:

LibertyStructure::embellishStructureHash ( &$  pParamHash  ) 

cleans up and reorganises data in nested array where keys are structure_id

Parameters:
$pParamHash contains a nested set of arrays with structure_id as key
Returns:
reorganised array

Definition at line 512 of file LibertyStructure.php.

References $pParamHash.

Referenced by verifyStructure().

LibertyStructure::exportHtml (  ) 

exportHtml

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 767 of file LibertyStructure.php.

References $ret, FALSE, getContentArray(), LibertyBase::getLibertyObject(), mContentId, and url.

Here is the call graph for this function:

LibertyStructure::fetch_toc (  ) 

Definition at line 1012 of file LibertyStructure.php.

References fetchToc().

Here is the call graph for this function:

LibertyStructure::fetchToc ( structure_tree,
showdesc,
numbering 
)

fetchToc

Parameters:
array $structure_tree
array $showdesc
array $numbering public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 865 of file LibertyStructure.php.

References $gBitSmarty, and $ret.

Referenced by fetch_toc(), and getToc().

LibertyStructure::flattenStructureHash ( pParamHash,
i = -10000 
)

make sure the array only contains one level depth

Parameters:
$pParamHash contains a nested set of arrays with structure_id and pos values set
Returns:
flattened array

Definition at line 491 of file LibertyStructure.php.

References $i, $pParamHash, and $ret.

Referenced by verifyStructure().

LibertyStructure::get_next_page (  ) 

Definition at line 1010 of file LibertyStructure.php.

References getNextStructureNode().

Here is the call graph for this function:

LibertyStructure::get_prev_page (  ) 

Definition at line 1009 of file LibertyStructure.php.

References getPrevStructureNode().

Here is the call graph for this function:

LibertyStructure::get_toc (  ) 

Definition at line 1011 of file LibertyStructure.php.

References getToc().

Here is the call graph for this function:

LibertyStructure::getChildNodes ( pStructureHash,
pParentId = 0 
)

Get all structures in $pStructureHash that have a given parent_id

Parameters:
$pStructureHash full menu as supplied by '$this->getItemList( $pMenuId );'
Returns:
array of nodes with a given parent_id

Definition at line 258 of file LibertyStructure.php.

References $ret.

Referenced by createSubTree().

LibertyStructure::getContentArray ( pStructureId,
&$  pToc,
pLevel = 0 
)

getContentArray

Parameters:
array $pStructureId
array $pToc
float $pLevel public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 752 of file LibertyStructure.php.

References $query, $result, $row, getContentIds(), and mDb.

Referenced by exportHtml().

Here is the call graph for this function:

LibertyStructure::getContentIds ( pStructureId,
&$  pToc,
pLevel = 0 
)

getContentIds

Parameters:
array $pStructureId
array $pToc
float $pLevel public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 732 of file LibertyStructure.php.

References $query, $result, $ret, $row, and mDb.

Referenced by getContentArray().

LibertyStructure::getList ( &$  pListHash  ) 

getList

Parameters:
array $pListHash public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 347 of file LibertyStructure.php.

References $gBitSystem, $gBitUser, $mid, $query, $res, $result, $ret, mDb, BitBase::prepGetList(), title, and BitBase::verifyId().

Here is the call graph for this function:

LibertyStructure::getNextStructureNode ( structure_id,
deep = true 
)

getNextStructureNode

Parameters:
array $structure_id
array $deep public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 894 of file LibertyStructure.php.

References $query, $res, getNode(), and mDb.

Referenced by get_next_page(), and loadNavigation().

Here is the call graph for this function:

LibertyStructure::getNode ( pStructureId = NULL,
pContentId = NULL 
)

get the details to a given node

Parameters:
array $pStructureId Structure ID of the node
array $pContentId Content ID of the node public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 50 of file LibertyStructure.php.

References $contentTypes, $gBitSystem, $gLibertySystem, $query, $result, $ret, $type, mDb, mPackages, title, and BitBase::verifyId().

Referenced by getNextStructureNode(), getPath(), getPrevStructureNode(), getStructureParentInfo(), load(), loadNavigation(), moveNodeWest(), and removeStructureNode().

Here is the call graph for this function:

LibertyStructure::getPath ( pStructureId  ) 

This can be used to construct a path from the structure head to the requested page.

Returns:
an array of page_info arrays.

Definition at line 193 of file LibertyStructure.php.

References getNode().

Referenced by loadPath().

Here is the call graph for this function:

LibertyStructure::getPrevStructureNode ( structure_id,
deep = false 
)

getPrevStructureNode

Parameters:
array $structure_id
array $deep public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 940 of file LibertyStructure.php.

References $query, $res, $result, getNode(), and mDb.

Referenced by get_prev_page(), and loadNavigation().

Here is the call graph for this function:

LibertyStructure::getRootStructureId ( &$  pParamHash  ) 

if you only have a structure id and you want to figure out the root structure id, use this

Parameters:
array $pParamHash['structure_id'] is the structure id from which you want to figure out the root structure id public
Returns:
none. updates $pParamHash['root_structure_id'] by reference

Definition at line 131 of file LibertyStructure.php.

References $pParamHash, mDb, mInfo, and BitBase::verifyId().

Referenced by getStructure().

Here is the call graph for this function:

LibertyStructure::getRootTitle (  ) 

get the title of the root node

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 116 of file LibertyStructure.php.

References $ret, mInfo, and title.

LibertyStructure::getStructure ( &$  pParamHash  ) 

Get full structure from database

Parameters:
$pStructureId structure for which we want structure
Returns:
full structure

Definition at line 209 of file LibertyStructure.php.

References $contentTypes, $gBitSystem, $gLibertySystem, $pParamHash, $query, $res, $result, $ret, $type, FALSE, getRootStructureId(), load(), mDb, mPackages, title, and BitBase::verifyId().

Referenced by getSubTree().

Here is the call graph for this function:

LibertyStructure::getStructureNodes ( pParentId  ) 

Return an array of subpages

Parameters:
array $pParentId public
Returns:
array of child structure pages

Definition at line 990 of file LibertyStructure.php.

References $query, $res, $result, $ret, and mDb.

Referenced by s_get_pages().

LibertyStructure::getStructureParentInfo ( structure_id  ) 

Returns an array of info about the parent

Parameters:
array $structure_id public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 713 of file LibertyStructure.php.

References getNode(), mDb, and BitBase::verifyId().

Referenced by loadNavigation(), and s_get_parent_info().

Here is the call graph for this function:

LibertyStructure::getSubTree ( pStructureId,
pRootTree = FALSE,
pListHash = NULL 
)

Definition at line 329 of file LibertyStructure.php.

References $gBitSystem, $gLibertySystem, $ret, createSubTree(), getStructure(), and BitBase::verifyId().

Here is the call graph for this function:

LibertyStructure::getToc ( pStructureId = NULL,
order = 'asc',
showdesc = false,
numbering = true,
numberPrefix = '' 
)

getToc

Parameters:
array $pStructureId
string $order
array $showdesc
array $numbering
string $numberPrefix public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 848 of file LibertyStructure.php.

References buildSubtreeToc(), fetchToc(), and BitBase::verifyId().

Referenced by get_toc().

Here is the call graph for this function:

LibertyStructure::isRootNode (  ) 

Check if a node is a root node

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 102 of file LibertyStructure.php.

References $ret, FALSE, mInfo, and BitBase::verifyId().

Referenced by loadNavigation().

Here is the call graph for this function:

LibertyStructure::isValid (  ) 

Definition at line 154 of file LibertyStructure.php.

References BitBase::verifyId().

Referenced by loadNavigation(), loadPath(), moveNodeEast(), moveNodeNorth(), moveNodeSouth(), and moveNodeWest().

Here is the call graph for this function:

LibertyStructure::LibertyStructure ( pStructureId = NULL,
pContentId = NULL 
)

Definition at line 23 of file LibertyStructure.php.

References LibertyBase::LibertyBase(), and mContentId.

Here is the call graph for this function:

LibertyStructure::load (  ) 

Definition at line 30 of file LibertyStructure.php.

References $gLibertySystem, getNode(), mContentId, and mInfo.

Referenced by getStructure().

Here is the call graph for this function:

LibertyStructure::loadNavigation (  ) 

loadNavigation

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 164 of file LibertyStructure.php.

References getNextStructureNode(), getNode(), getPrevStructureNode(), getStructureParentInfo(), isRootNode(), isValid(), and mInfo.

Here is the call graph for this function:

LibertyStructure::loadPath (  ) 

Definition at line 182 of file LibertyStructure.php.

References getPath(), isValid(), and mInfo.

Here is the call graph for this function:

LibertyStructure::moveNodeEast (  ) 

moveNodeEast

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 587 of file LibertyStructure.php.

References $query, $res, $result, isValid(), mDb, and mInfo.

Here is the call graph for this function:

LibertyStructure::moveNodeNorth (  ) 

moveNodeNorth

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 639 of file LibertyStructure.php.

References $query, $res, $result, isValid(), mDb, and mInfo.

Here is the call graph for this function:

LibertyStructure::moveNodeSouth (  ) 

moveNodeSouth

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 617 of file LibertyStructure.php.

References $query, $res, $result, isValid(), mDb, and mInfo.

Here is the call graph for this function:

LibertyStructure::moveNodeWest (  ) 

moveNodeWest

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 562 of file LibertyStructure.php.

References $query, getNode(), isValid(), mDb, mInfo, and BitBase::verifyId().

Here is the call graph for this function:

LibertyStructure::removeStructureNode ( structure_id,
delete = FALSE 
)

Definition at line 667 of file LibertyStructure.php.

References $count, $query, $res, $result, getNode(), mDb, and BitBase::verifyId().

Referenced by s_remove_page().

Here is the call graph for this function:

LibertyStructure::s_get_pages (  ) 

Definition at line 1008 of file LibertyStructure.php.

References getStructureNodes().

Here is the call graph for this function:

LibertyStructure::s_get_parent_info (  ) 

Definition at line 1013 of file LibertyStructure.php.

References getStructureParentInfo().

Here is the call graph for this function:

LibertyStructure::s_remove_page (  ) 

Definition at line 1007 of file LibertyStructure.php.

References removeStructureNode().

Here is the call graph for this function:

LibertyStructure::setTreeRoot ( pRootId,
pTree 
)

Definition at line 144 of file LibertyStructure.php.

References mDb.

LibertyStructure::storeNode ( &$  pParamHash  ) 

Create a structure entry with the given name

Parameters:
parent_id The parent entry to add this to. If NULL, create new structure.
after_ref_id The entry to add this one after. If NULL, put it in position 0.
name The wiki page to reference
alias An alias for the wiki page name.
Returns:
the new entries structure_id or null if not created.

Definition at line 531 of file LibertyStructure.php.

References $gBitSystem, $now, $pParamHash, $query, $result, $ret, mDb, BitBase::verifyId(), and verifyNode().

Here is the call graph for this function:

LibertyStructure::storeStructure ( pParamHash  ) 

store a complete structure where ever subarray contains a complete node as it should go into the database

Parameters:
$pParamHash is an array with subarrays, each representing a structure node ready to associativley inserted into the database
Returns:
TRUE on success, FALSE on failure where $this->mErrors will contain the reason why it failed

Definition at line 471 of file LibertyStructure.php.

References $pParamHash, $query, $result, mDb, and verifyStructure().

Here is the call graph for this function:

LibertyStructure::verifyNode ( &$  pParamHash  ) 

prepare a structure node for storage in the database

Parameters:
$pParamHash contains various settings for the node to be stored
Returns:
TRUE on success, FALSE on failure where $this->mErrors will contain the reason why it failed

Definition at line 401 of file LibertyStructure.php.

References $pParamHash, $query, $result, mDb, and BitBase::verifyId().

Referenced by storeNode().

Here is the call graph for this function:

LibertyStructure::verifyStructure ( &$  pParamHash  ) 

clean up and prepare a complete structure in the form of arrays about to be stored

Parameters:
$pParamHash is a set of arrays generated by the DynamicTree javascript tree builder
Returns:
TRUE on success, FALSE on failure where $this->mErrors will contain the reason why it failed

Definition at line 432 of file LibertyStructure.php.

References $pParamHash, embellishStructureHash(), flattenStructureHash(), tra(), and BitBase::verifyId().

Referenced by storeStructure().

Here is the call graph for this function:


Member Data Documentation

LibertyStructure::$mStructureId

Definition at line 21 of file LibertyStructure.php.


The documentation for this class was generated from the following file:
Generated on Wed Aug 22 19:34:45 2007 for bitweaver by  doxygen 1.5.2