Class Hierarchy
DataObjects that use the Hierachy decorator can be be organised as a hierachy, with children and parents. The most obvious example of this is SiteTree.
- Extension
-
DataObjectDecorator
-
Hierarchy
Methods summary
public
|
|
public
|
|
public
|
|
public
string
|
#
getChildrenAsUL( string $attributes = "", string $titleEval = '"<li>" . $child->Title', string $extraArg = null, boolean $limitToMarked = false, string $childrenMethod = "AllChildrenIncludingDeleted", boolean $numChildrenMethod = "numChildren", integer $rootCall = true, mixed $minNodeCount = 30 )
Returns the children of this DataObject as an XHTML UL. This will be called recursively on each child, so if they have children they will be displayed as a UL inside a LI. |
public
integer
|
#
markPartialTree( integer $minNodeCount = 30, mixed $context = null, mixed $childrenMethod = "AllChildrenIncludingDeleted", mixed $numChildrenMethod = "numChildren" )
Mark a segment of the tree, by calling mark(). The method performs a breadth-first traversal until the number of nodes is more than minCount. This is used to get a limited number of tree nodes to show in the CMS initially. |
public
|
#
setMarkingFilter( string $parameterName, mixed $parameterValue )
Filter the marking to only those object with $node->$parameterName = $parameterValue |
public
|
#
setMarkingFilterFunction( string $funcName )
Filter the marking to only those where the function returns true. The node in question will be passed to the function. |
public
boolean
|
#
markingFilterMatches(
Returns true if the marking filter matches on the given node. |
public
|
#
markChildren(
Mark all children of the given node that match the marking filter. |
protected
|
#
markingFinished( mixed $numChildrenMethod = "numChildren" )
Ensure marked nodes that have children are also marked expanded. Call this after marking but before iterating over the tree. |
public
|
#
markingClasses( )
Return CSS classes of 'unexpanded', 'closed', both, or neither, depending on the marking of this DataObject. |
public
|
|
public
|
#
markToExpose(
Expose the given object in the tree, by marking this page and all it ancestors. |
public
|
|
public
array
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
|
public
boolean
|
|
public
|
|
public
|
|
public
integer
|
|
public
|
#
loadDescendantIDListInto( mixed & $idList )
Get a list of this DataObject's and all it's descendants ID, and put it in $idList. |
public
|
|
public
|
|
public
|
#
AllChildrenIncludingDeleted( mixed $context = null )
Return all children, including those that have been deleted but are still in live. Deleted children will be marked as "DeletedFromStage" Added children will be marked as "AddedToStage" Modified children will be marked as "ModifiedOnStage" Everything else has "SameOnStage" set, as an indicator that this information has been looked up. |
public
|
|
public
|
#
AllHistoricalChildren( )
Return all the children that this page had, including pages that were deleted from both stage & live. |
public
|
#
numHistoricalChildren( )
Return the number of children that this page ever had, including pages that were deleted |
public
integer
|
#
numChildren(
Return the number of direct children. By default, values are cached after the first invocation. Can be augumented by augmentNumChildrenCountQuery(). |
public
|
|
public
|
#
liveChildren( boolean $showAll = false, boolean $onlyDeletedFromStage = false )
Return children from the live site, if it exists. |
public
|
|
public
|
#
getAncestors( )
Return all the parents of this class in a set ordered from the lowest to highest parent. |
public
|
#
naturalPrev( mixed $className, mixed $afterNode = null )
Get the next node in the tree of the type. If there is no instance of the className descended from this node, then search the parents. |
public
|
#
naturalNext( string $className = null, string|integer $root = 0,
Get the next node in the tree of the type. If there is no instance of the className descended from this node, then search the parents. |
public
|
Methods inherited from DataObjectDecorator
can(),
canCreate(),
canDelete(),
canEdit(),
extraStatics(),
load_extra_statics(),
onAfterDelete(),
onAfterWrite(),
onBeforeDelete(),
onBeforeWrite(),
populateDefaults(),
requireDefaultRecords(),
updateCMSActions(),
updateCMSFields(),
updateFieldLabels(),
updateFrontEndFields(),
updateSummaryFields()
Methods inherited from Extension
__construct(),
clearOwner(),
getOwner(),
get_classname_without_arguments(),
setOwner()
Magic methods summary
Properties summary
protected
mixed
|
$markedNodes | |
protected
mixed
|
$markingFilter | |
protected
|
$_cache_numChildren | |
protected static
boolean
|
$marked |
#
True if this DataObject is marked. |
protected static
boolean
|
$expanded |
#
True if this DataObject is expanded. |
protected static
boolean
|
$treeOpened |
#
True if this DataObject is opened. |