Function Hook_ajax_tree_choose_homesite_addon->simple
Definitions
sources/hooks/systems/ajax_tree/choose_homesite_addon.php
- Generate a simple selection list for the ajax-tree hook. Returns a normal <select> style <option>-list, for fallback purposes.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $id | ?ID_TEXT | No | No | required parameter | N/A | N/A | The ID to do under (null: root) - not always supported |
| $options | array | No | No | required parameter | N/A | N/A | Options being passed through |
| $it | ?ID_TEXT | No | No | Null | N/A | N/A | The ID to select by default (null: none) |
| $prefix | string | No | No | Blank (empty string) | N/A | N/A | Prefix titles with this |
Returns
- The nice list
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Generate a simple selection list for the ajax-tree hook. Returns a normal <select> style <option>-list, for fallback purposes.
*
* @param ?ID_TEXT $id The ID to do under (null: root) - not always supported
* @param array $options Options being passed through
* @param ?ID_TEXT $it The ID to select by default (null: none)
* @param string $prefix Prefix titles with this
* @return Tempcode The nice list
*/
public function simple(?string $id, array $options, ?string $it = null, string $prefix = '') : object
* Generate a simple selection list for the ajax-tree hook. Returns a normal <select> style <option>-list, for fallback purposes.
*
* @param ?ID_TEXT $id The ID to do under (null: root) - not always supported
* @param array $options Options being passed through
* @param ?ID_TEXT $it The ID to select by default (null: none)
* @param string $prefix Prefix titles with this
* @return Tempcode The nice list
*/
public function simple(?string $id, array $options, ?string $it = null, string $prefix = '') : object

