Public Method Details |
SectionNavigator |
public boolean SectionNavigator([ object pxdb_record $section ])
|
|
|
Parameter |
|
object pxdb_record |
$section |
= >>null<< |
|
- optional |
|
Returns |
boolean success |
|
&singleton |
public object SectionNavigator &singleton([ object pxdb_record $section ])
|
|
|
Parameter |
|
object pxdb_record |
$section |
= >>null<< |
|
|
|
Returns |
object SectionNavigator |
|
setSection |
public mixed setSection(mixed $section)
|
|
|
Parameter |
|
mixed |
$section |
|
|
Either URL PATH* string or object pxdb_record *this is changed |
|
Returns |
mixed object pxdb_record if URL Path was passed or boolean success or failure |
|
hasChildren |
public boolean hasChildren([ object pxdb_record $section ])
|
|
Can be used as a static method
|
Parameter |
|
object pxdb_record |
$section |
= >>null<< |
|
(optional) The Section to be tested |
|
Returns |
boolean |
|
&getChildren |
public object pxdb_collection &getChildren([ object pxdb_record $section ])
|
|
|
Parameter |
|
object pxdb_record |
$section |
= >>null<< |
|
section to be tested (optional) |
|
Returns |
object pxdb_collection Collection of children |
|
&getHomeSection |
public object pxdb_record &getHomeSection()
|
|
TODO: oam, make this callable statically?
|
Returns |
object pxdb_record the home section |
|
isHomeSection |
public boolean isHomeSection([ object pxdb_record $section ])
|
|
|
Parameter |
|
object pxdb_record |
$section |
= >>null<< |
|
|
|
Returns |
boolean |
|
getNavPath |
public string getNavPath([ object pxdb_record $section, string $url_root ])
|
|
|
Parameter |
|
object pxdb_record |
$section |
= >>null<< |
|
|
|
|
string |
$url_root |
= >>'section'<< |
|
root to prepend to section path (defaults to section) |
|
Returns |
string |
|
&getParent |
public object pxdb_record &getParent([ object pxdb_record $section ])
|
|
|
Parameter |
|
object pxdb_record |
$section |
= >>null<< |
|
of type section |
|
Returns |
object pxdb_record of type section or bool false |
|
setDescend |
public boolean setDescend(boolean $descend)
|
|
|
Parameter |
|
boolean |
$descend |
|
|
Whether or not to descend. |
|
Returns |
boolean success |
|
&getNextSection |
public object pxdb_record &getNextSection([ object pxdb_record $section ])
|
|
depth in the tree (with home and its children being OR the section you pass in being depth 0). Use setDescend(bool) to tell the class whether or not to descend into children of a given section. If left to its own devices, it will get all sections, hidden or not, in the current request path or not. Returns false when there are no more sections to get.
|
Parameter |
|
object pxdb_record |
$section |
= >>null<< |
|
of type section from which to start tree walk |
|
Returns |
object pxdb_record of type section or false |
|
getDepth |
public integer getDepth()
|
|
|
Returns |
integer |
|
countChildren |
public integer countChildren()
|
|
|
Returns |
integer |
|
setShowHiddenSections |
public void setShowHiddenSections([ boolean $show ])
|
|
|
Parameter |
|
boolean |
$show |
= >>true<< |
|
=return hidden sections (default) |
|
Returns |
void |
|
&getAncestorCollection |
public void &getAncestorCollection([ object Section $section ])
|
|
Obeys showHiddenSections
|
Parameter |
|
object Section |
$section |
= >>null<< |
|
-- optional, section to start at |
|
Returns |
void |
|
getDescendantIds |
public array getDescendantIds()
|
|
Note, this method moves the children pointer so if you are using it inside a loop you should use a new instance of SectionNavigator and not reuse an existing instance.
|
Returns |
array |
|