Get the tag for a checkbox which value should be appendable (ie: where the name ends with []).
mixed
appendableCheckbox
(string $fieldName, [array $htmlAttributes = array()], [boolean $return = false])
-
string
$fieldName: The field name that will hold each checkbox (it appends [] to it to make it an array)
-
array
$htmlAttributes: HTML attributes for the element.
-
boolean
$return: Wheter this method should return a value or output it.
Get a tree of checkboxes for a threaded list.
mixed
generateThreadedCheckBoxes
(string $field, &$thread, [string $fieldChildren = 'children'], [string $fieldValue = 'value'], [string $fieldName = 'name'], [boolean $return = false], array $thread)
-
string
$field: Name attribute of the SELECT
-
array
$thread: The threaded array as return by Model->findAllThreaded()
-
string
$fieldChildren: The index where the children can be found
-
string
$fieldValue: The index where the value can be found
-
string
$fieldName: The index where the name can be found
-
boolean
$return: Whether this method should return a value
-
&$thread
Get a tree of links for a threaded list.
mixed
generateThreadedLinks
(array $model, string $url, &$thread, [string $fieldChildren = 'children'], [string $fieldValue = 'value'], [string $fieldName = 'name'], [boolean $return = false], array $thread)
-
array
$model: Model returned by findAllThreaded()
-
string
$url: URL that will be generated (where the string ${VALUE} will be replaced with the value of the record)
-
array
$thread: The threaded array as return by Model->findAllThreaded()
-
string
$fieldChildren: The index where the children can be found
-
string
$fieldValue: The index where the value can be found
-
string
$fieldName: The index where the name can be found
-
boolean
$return: Whether this method should return a value
-
&$thread
Get the SELECT tag for a threaded list.
mixed
generateThreadedList
(string $field, &$thread, [mixed $selected = null], [array $selectAttr = array()], [array $optionAttr = null], [boolean $showEmpty = true], [string $fieldChildren = 'children'], [string $fieldValue = 'id'], [string $fieldName = 'name'], [boolean $return = false], array $thread)
-
string
$field: Name attribute of the SELECT
-
array
$thread: The threaded array as return by Model->findAllThreaded()
-
mixed
$selected: Selected option
-
array
$selectAttr: Array of HTML options for the opening SELECT element
-
array
$optionAttr: Array of HTML options for the enclosed OPTION elements
-
boolean
$showEmpty: If true, the empty select option is shown
-
string
$fieldChildren: The index where the children can be found
-
string
$fieldValue: The index where the value can be found
-
string
$fieldName: The index where the name can be found
-
boolean
$return: Whether this method should return a value
-
&$thread