Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence du fichier layouts/joomla/form/field/checkboxes.php

Espaces de nommage

 Joomla\Site
 

Variables

 $format = '<input type="checkbox" id="%1$s" name="%2$s" value="%3$s" %4$s>'
 
 $alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name)
 
foreach( $options as $i=> $option)((string) $option->value, $checkedOptions, true) ? 'checked' $checked = (!$hasValue && $option->checked) ? 'checked' : $checked
 
 $optionClass = !empty($option->class) ? 'class="form-check-input ' . $option->class . '"' : ' class="form-check-input"'
 
 $optionDisabled = !empty($option->disable) || $disabled ? 'disabled' : ''
 
 $onclick = !empty($option->onclick) ? 'onclick="' . $option->onclick . '"' : ''
 
 $onchange = !empty($option->onchange) ? 'onchange="' . $option->onchange . '"' : ''
 
 $oid = $id . $i
 
 $value = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8')
 
 $attributes = array_filter(array($checked, $optionClass, $optionDisabled, $onchange, $onclick))
 
 endforeach
 

Documentation des variables

◆ $alt

$alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name)

◆ $attributes

$attributes = array_filter(array($checked, $optionClass, $optionDisabled, $onchange, $onclick))

◆ $checked

foreach ($options as $i => $option) ((string) $option->value, $checkedOptions, true) ? 'checked' $checked = (!$hasValue && $option->checked) ? 'checked' : $checked

◆ $format

$format = '<input type="checkbox" id="%1$s" name="%2$s" value="%3$s" %4$s>'

The format of the input tag to be filled in using sprintf. %1 - id %2 - name %3 - value %4 = any other attributes

◆ $oid

◆ $onchange

$onchange = !empty($option->onchange) ? 'onchange="' . $option->onchange . '"' : ''

◆ $onclick

$onclick = !empty($option->onclick) ? 'onclick="' . $option->onclick . '"' : ''

◆ $optionClass

$optionClass = !empty($option->class) ? 'class="form-check-input ' . $option->class . '"' : ' class="form-check-input"'

◆ $optionDisabled

$optionDisabled = !empty($option->disable) || $disabled ? 'disabled' : ''

◆ $value

$value = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8')

◆ endforeach

endforeach