class PageSelector (View source)

Methods

string
selectPage($fieldName, bool|int $cID = false, array $options = [])

Creates form fields and JavaScript page chooser for choosing a page. For use with inclusion in blocks.

quickSelect($key, $cID = false, $miscFields = [])

No description

selectMultipleFromSitemap($field, $pages = [], $startingPoint = 'HOME_CID', $filters = [])

No description

selectFromSitemap($field, $page = null, $startingPoint = 'HOME_CID', SiteTree|null $siteTree = null, $filters = [])

No description

Details

string selectPage($fieldName, bool|int $cID = false, array $options = [])

Creates form fields and JavaScript page chooser for choosing a page. For use with inclusion in blocks.


    $dh->selectPage('pageID', '1'); // prints out the home page and makes it selectable.
```.

Parameters

$fieldName
bool|int $cID
array $options

Return Value

string

quickSelect($key, $cID = false, $miscFields = [])

No description

Parameters

$key
$cID
$miscFields

selectMultipleFromSitemap($field, $pages = [], $startingPoint = 'HOME_CID', $filters = [])

No description

Parameters

$field
$pages
$startingPoint
$filters

selectFromSitemap($field, $page = null, $startingPoint = 'HOME_CID', SiteTree|null $siteTree = null, $filters = [])

No description

Parameters

$field
$page
$startingPoint
SiteTree|null $siteTree
$filters