Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence du fichier form/field/radio/buttons.php

Espaces de nommage

 Joomla\Site
 

Variables

 $alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name)
 
 $isBtnGroup = strpos(trim($class), 'btn-group') !== false
 
 $isBtnYesNo = strpos(trim($class), 'btn-group-yesno') !== false
 
 $classToggle = $isBtnGroup ? 'btn-check' : 'form-check-input'
 
 $btnClass = $isBtnGroup ? 'btn btn-outline-secondary' : 'form-check-label'
 
 $blockStart = $isBtnGroup ? '' : '<div class="form-check">'
 
 $blockEnd = $isBtnGroup ? '' : '</div>'
 
 $containerClass = trim($class . ' radio' . ($readonly || $disabled ? ' disabled' : '') . ($readonly ? ' readonly' : ''))
 
 $attribs = ['id="' . $id . '"']
 
if(!empty($disabled)) if(!empty($autofocus)) if($readonly|| $disabled) if ( $dataAttribute)
 
foreach($options as $i=> $option) $disabled = !empty($option->disable) ? 'disabled' : ''
 
 $style = $disabled ? ' style="pointer-events: none"' : ''
 
if($isBtnYesNo) $optionClass = !empty($option->class) ? $option->class : $btnClass
 
 $checked = ((string) $option->value === $value) ? 'checked="checked"' : ''
 
 $onclick = !empty($option->onclick) ? 'onclick="' . $option->onclick . '"' : ''
 
 $onchange = !empty($option->onchange) ? 'onchange="' . $option->onchange . '"' : ''
 
 $oid = $id . $i
 
 $ovalue = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8')
 
 $attributes = array_filter(array($checked, $disabled, ltrim($style), $onchange, $onclick))
 
if($required) endif
 
 endforeach
 

Documentation des variables

◆ $alt

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

◆ $attribs

$attribs = ['id="' . $id . '"']

◆ $attributes

$attributes = array_filter(array($checked, $disabled, ltrim($style), $onchange, $onclick))

◆ $blockEnd

$blockEnd = $isBtnGroup ? '' : '</div>'

◆ $blockStart

$blockStart = $isBtnGroup ? '' : '<div class="form-check">'

◆ $btnClass

string $btnClass = $isBtnGroup ? 'btn btn-outline-secondary' : 'form-check-label'

◆ $checked

$checked = ((string) $option->value === $value) ? 'checked="checked"' : ''

◆ $classToggle

$classToggle = $isBtnGroup ? 'btn-check' : 'form-check-input'

◆ $containerClass

$containerClass = trim($class . ' radio' . ($readonly || $disabled ? ' disabled' : '') . ($readonly ? ' readonly' : ''))

◆ $disabled

foreach ( $options as $i=> $option) $disabled = !empty($option->disable) ? 'disabled' : ''

◆ $isBtnGroup

$isBtnGroup = strpos(trim($class), 'btn-group') !== false

◆ $isBtnYesNo

$isBtnYesNo = strpos(trim($class), 'btn-group-yesno') !== false

◆ $oid

$oid = $id . $i

◆ $onchange

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

◆ $onclick

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

◆ $optionClass

$optionClass = !empty($option->class) ? $option->class : $btnClass

◆ $ovalue

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

◆ $style

◆ endforeach

endforeach

◆ endif

if ( $required) endif

◆ if

if (!empty( $disabled)) if (!empty( $autofocus)) if ( $readonly||$disabled) if($dataAttribute)