Elgg
Version master
|
Go to the source code of this file.
Variables | |
$defaults | |
Displays a checkbox input field. More... | |
$vars = array_merge($defaults, $vars) | |
$options_values = elgg_extract('options_values', $vars, []) | |
$input_options = [] | |
foreach($options_values as $key=> $value) | $options = elgg_extract('options', $vars) |
if(!empty($options)&&empty($input_options)) if(empty($input_options)) | $list_class |
$id = elgg_extract('id', $vars, '') | |
if(is_array(elgg_extract('value', $vars))) | else |
if($vars['name']&&$vars['default']!==false) | $input_vars = $vars |
$input_vars ['default'] = false | |
$checkboxes = '' | |
foreach ($input_options as $label=> $option) | |
$checkboxes = '' |
Definition at line 97 of file checkboxes.php.
$defaults |
Displays a checkbox input field.
string $vars['name'] The name of the input fields (Forced to an array by appending []) array $vars['options'] An array of strings representing the label => option for the each checkbox field array $vars['options_values'] An associative array of 'value' => ['text' => 'option'] string $vars['default'] The default value to send if nothing is checked. Optional, defaults to 0. Set to FALSE for no default. bool $vars['disabled'] Make all input elements disabled. Optional. string $vars['value'] The current value. Single value or array. Optional. string $vars['class'] Additional class of the list. Optional. string $vars['align'] 'horizontal' or 'vertical' Default: 'vertical'
Definition at line 23 of file checkboxes.php.
$id = elgg_extract('id', $vars, '') |
Definition at line 70 of file checkboxes.php.
$input_options = [] |
Definition at line 36 of file checkboxes.php.
Definition at line 89 of file checkboxes.php.
$input_vars['default'] = false |
Definition at line 90 of file checkboxes.php.
Definition at line 64 of file checkboxes.php.
foreach ($options_values as $key=> $value) $options = elgg_extract('options', $vars) |
Definition at line 52 of file checkboxes.php.
$options_values = elgg_extract('options_values', $vars, []) |
Definition at line 33 of file checkboxes.php.
$vars = array_merge($defaults, $vars) |
Definition at line 31 of file checkboxes.php.
if (is_array(elgg_extract('value', $vars))) else |
Definition at line 75 of file checkboxes.php.
foreach($input_options as $label=> $option) |
Definition at line 98 of file checkboxes.php.