SilverStripe\CMS\Controllers\CMSMain::getSiteTreeFor
Get a site tree HTML listing which displays the nodes under the given criteria.
Signature
public function getSiteTreeFor(string
$className,
[string
$rootID = NULL,
[string
$childrenMethod = NULL,
[string
$numChildrenMethod = NULL,
[callable
$filterFunction = NULL,
[int
$nodeCountThreshold = NULL]]]]] )
Parameters
$className
—
string
- The class of the root object
$rootID
—
string
- The ID of the root object. If this is null then a complete tree will be
shown
$childrenMethod
—
string
- The method to call to get the children of the tree. For example,
Children, AllChildrenIncludingDeleted, or AllHistoricalChildren
$numChildrenMethod
—
string
$filterFunction
—
object
$nodeCountThreshold
—
int
Returns
- string
- Nested unordered list with links to each page