liberty
[ class tree: liberty ] [ index: liberty ] [ all elements ]

Class: LibertyStructure

Source Location: /liberty/LibertyStructure.php

Class Overview

BitBase
   |
   --LibertyBase
      |
      --LibertyStructure

System class for handling the liberty package


Variables

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: LibertyBase

LibertyBase::__construct()
Constructor building on BitBase object
LibertyBase::getLibertyClass()
given a content_type_guid this will return an object of the proper type
LibertyBase::getLibertyObject()
Given a content_id, this will return and object of the proper type
LibertyBase::getNewObject()
Simple method to create a given class with a specified content_id. The purpose of a method is to allow for derived classes to override as necessary.
LibertyBase::getNewObjectById()
Simple method to create a given class with a specified primary_id. The purpose of a method is to allow for derived classes to override as necessary.

Class: BitBase

BitBase::BitBase()
During initialisation, we assign a name which is used by the class.
BitBase::__construct()
BitBase::clearFromCache()
BitBase::expunge()
Delete content object and all related records
BitBase::load()
BitBase::__destruct()

Class Details

[line 19]
System class for handling the liberty package



[ Top ]


Class Variables

$mStructureId =

[line 20]


Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 22]

LibertyStructure __construct( [ $pStructureId = NULL], [ $pContentId = NULL])



Overrides LibertyBase::__construct() (Constructor building on BitBase object)

Parameters:

   $pStructureId  
   $pContentId  

[ Top ]

method buildSubtreeToc [line 902]

TRUE buildSubtreeToc( array $id, [string $order = 'asc'], [string $tocPrefix = ''], [ $pPrefixDepth = 1], [ $pDepth = 1], array $slide)

buildSubtreeToc



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


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)
   $pPrefixDepth  
   $pDepth  

[ Top ]

method buildTreeToc [line 884]

TRUE buildTreeToc( array $id, [string $order = 'asc'], [string $tocPrefix = ''], [ $pPrefixDepth = 1], [ $pDepth = 1], array $slide)

buildSubtreeToc



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


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)
   $pPrefixDepth  
   $pDepth  

[ Top ]

method createSubTree [line 296]

nicely createSubTree( $pStructureHash $pStructureHash, [ $pParentId = 0], [ $pParentPos = ''], [ $pLevel = 0])

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



Tags:

return:  formatted and cleaned up structure array


Parameters:

$pStructureHash   $pStructureHash   raw structure data from database
   $pParentId  
   $pParentPos  
   $pLevel  

[ Top ]

method embellishStructureHash [line 550]

reorganised embellishStructureHash( $pParamHash &$pParamHash)

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



Tags:

return:  array


Parameters:

$pParamHash   &$pParamHash   contains a nested set of arrays with structure_id as key

[ Top ]

method exportHtml [line 838]

TRUE exportHtml( )

exportHtml



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method fetchToc [line 993]

TRUE fetchToc( array $structureTree, array $showdesc, array $numbering, [ $pCss = ''])

fetchToc



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $structureTree  
array   $showdesc  
array   $numbering  
   $pCss  

[ Top ]

method flattenStructureHash [line 529]

flattened flattenStructureHash( $pParamHash $pParamHash, [ $i = -10000])

make sure the array only contains one level depth



Tags:

return:  array


Parameters:

$pParamHash   $pParamHash   contains a nested set of arrays with structure_id and pos values set
   $i  

[ Top ]

method getChildNodes [line 279]

array getChildNodes( $pStructureHash $pStructureHash, [ $pParentId = 0])

Get all structures in $pStructureHash that have a given parent_id



Tags:

return:  of nodes with a given parent_id


Parameters:

$pStructureHash   $pStructureHash   full menu as supplied by '$this->getItemList( $pMenuId );'
   $pParentId  

[ Top ]

method getContentArray [line 823]

TRUE getContentArray( array $pStructureId, &$pToc, [float $pLevel = 0], array $pToc)

getContentArray



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pStructureId  
array   $pToc  
float   $pLevel  
   &$pToc  

[ Top ]

method getContentIds [line 803]

TRUE getContentIds( array $pStructureId, &$pToc, [float $pLevel = 0], array $pToc)

getContentIds



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pStructureId  
array   $pToc  
float   $pLevel  
   &$pToc  

[ Top ]

method getList [line 368]

TRUE getList( &$pListHash, array $pListHash)

getList



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pListHash  
   &$pListHash  

[ Top ]

method getNextStructureNode [line 1025]

TRUE getNextStructureNode( array $structure_id, [array $deep = true])

getNextStructureNode



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $structure_id  
array   $deep  

[ Top ]

method getNode [line 49]

TRUE getNode( [array $pStructureId = NULL], [array $pContentId = NULL])

get the details to a given node



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pStructureId   Structure ID of the node
array   $pContentId   Content ID of the node

[ Top ]

method getPath [line 207]

an getPath( $pStructureId)

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



Tags:

return:  array of page_info arrays.


Parameters:

   $pStructureId  

[ Top ]

method getPrevStructureNode [line 1071]

TRUE getPrevStructureNode( array $structure_id, [array $deep = false])

getPrevStructureNode



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $structure_id  
array   $deep  

[ Top ]

method getRootStructureId [line 145]

none. getRootStructureId( &$pParamHash, array $pParamHash['structure_id'])

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



Tags:

return:  updates $pParamHash['root_structure_id'] by reference
access:  public


Parameters:

array   $pParamHash['structure_id']   is the structure id from which you want to figure out the root structure id
   &$pParamHash  

[ Top ]

method getRootTitle [line 130]

TRUE getRootTitle( )

get the title of the root node



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method getStructure [line 223]

full getStructure( $pStructureId &$pParamHash)

Get full structure from database



Tags:

return:  structure


Parameters:

$pStructureId   &$pParamHash   structure for which we want structure

[ Top ]

method getStructureNodes [line 1121]

array getStructureNodes( array $pParentId)

Return an array of subpages



Tags:

return:  of child structure pages
access:  public


Parameters:

array   $pParentId  

[ Top ]

method getStructureParentInfo [line 784]

TRUE getStructureParentInfo( array $structure_id)

Returns an array of info about the parent



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $structure_id  

[ Top ]

method getSubTree [line 350]

void getSubTree( $pStructureId, [ $pRootTree = FALSE], [ $pListHash = NULL])



Parameters:

   $pStructureId  
   $pRootTree  
   $pListHash  

[ Top ]

method getToc [line 976]

TRUE getToc( [array $pStructureId = NULL], [string $order = 'asc'], [array $showdesc = false], [ $pNumberDepth = true], [string $numberPrefix = ''], [ $pCss = ''], array $numbering)

getToc



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pStructureId  
string   $order  
array   $showdesc  
array   $numbering  
string   $numberPrefix  
   $pNumberDepth  
   $pCss  

[ Top ]

method hasViewPermission [line 102]

void hasViewPermission( [ $pVerifyAccessControl = TRUE])



Parameters:

   $pVerifyAccessControl  

[ Top ]

method isInStructure [line 857]

void isInStructure( $pContentId)



Parameters:

   $pContentId  

[ Top ]

method isRootNode [line 116]

TRUE isRootNode( )

Check if a node is a root node



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method isValid [line 168]

void isValid( )



[ Top ]

method load [line 29]

void load( [ $pContentId = NULL])



Overrides BitBase::load() (parent method not documented)

Parameters:

   $pContentId  

[ Top ]

method loadNavigation [line 178]

TRUE loadNavigation( )

loadNavigation



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method loadPath [line 196]

void loadPath( )



[ Top ]

method loadStructure [line 865]

void loadStructure( )



[ Top ]

method moveNodeEast [line 658]

TRUE moveNodeEast( )

moveNodeEast



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method moveNodeNorth [line 710]

TRUE moveNodeNorth( )

moveNodeNorth



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method moveNodeSouth [line 688]

TRUE moveNodeSouth( )

moveNodeSouth



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method moveNodeWest [line 633]

TRUE moveNodeWest( )

moveNodeWest



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method removeStructureNode [line 738]

void removeStructureNode( $structure_id, [ $delete = FALSE])



Parameters:

   $structure_id  
   $delete  

[ Top ]

method setTreeRoot [line 158]

void setTreeRoot( $pRootId, $pTree)



Parameters:

   $pRootId  
   $pTree  

[ Top ]

method storeNode [line 602]

the storeNode( parent_id &$pParamHash, after_ref_id 1, name 2, alias 3)

Create a structure entry with the given name



Tags:

return:  new entries structure_id or null if not created.


Parameters:

after_ref_id   1   The entry to add this one after. If NULL, put it in position 0.
name   2   The wiki page to reference
alias   3   An alias for the wiki page name.
parent_id   &$pParamHash   The parent entry to add this to. If NULL, create new structure.

[ Top ]

method storeStructure [line 510]

TRUE storeStructure( $pParamHash $pParamHash)

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



Tags:

return:  on success, FALSE on failure where $this->mErrors will contain the reason why it failed


Parameters:

$pParamHash   $pParamHash   is an array with subarrays, each representing a structure node ready to associativley inserted into the database

[ Top ]

method verifyNode [line 567]

TRUE verifyNode( $pParamHash &$pParamHash)

prepare a structure node for storage in the database



Tags:

return:  on success, FALSE on failure where $this->mErrors will contain the reason why it failed


Parameters:

$pParamHash   &$pParamHash   contains various settings for the node to be stored

[ Top ]

method verifyStructure [line 426]

TRUE verifyStructure( $pParamHash &$pParamHash)

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



Tags:

return:  on success, FALSE on failure where $this->mErrors will contain the reason why it failed


Parameters:

$pParamHash   &$pParamHash   is a set of arrays generated by the DynamicTree javascript tree builder

[ Top ]


Documentation generated on Wed, 29 Jul 2015 13:56:58 +0000 by phpDocumentor 1.5.0-lsces