| 1 | <?php |
||
| 15 | class OptionalTreeDropdownField extends TreeDropdownField |
||
| 16 | { |
||
| 17 | private static $allowed_actions = array( |
||
|
|
|||
| 18 | 'tree', |
||
| 19 | ); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Define once rather than defining same line twice. |
||
| 23 | */ |
||
| 24 | private static $postTree = '</ul>'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Helper function to return the header (rather than defining same line twice). |
||
| 28 | */ |
||
| 29 | public function preTree() |
||
| 33 | |||
| 34 | public function getField($field) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Return the site tree |
||
| 41 | * For version 2.3 and earlier. |
||
| 42 | */ |
||
| 43 | public function gettree() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Get the whole tree of a part of the tree via an AJAX request with empty / none item prepended. |
||
| 52 | * |
||
| 53 | * @param SS_HTTPRequest $request |
||
| 54 | * |
||
| 55 | * @return string |
||
| 56 | * for version 2.4 and later |
||
| 57 | */ |
||
| 58 | public function tree(SS_HTTPRequest $request) |
||
| 66 | } |
||
| 67 |