PHP Class BootstrapUI\View\Widget\RadioWidget

Inheritance: extends Cake\View\Widget\RadioWidget
Datei anzeigen Open project: friendsofcake/bootstrap-ui

Protected Properties

Property Type Description
$_inline boolean Set on RadioWidget::render() to tell RadioWidget::_renderLabel() that we want to have inline aligned radios.

Public Methods

Method Description
render ( array $data, Cake\View\Form\ContextInterface $context ) : string Render a set of radio buttons.

Protected Methods

Method Description
_renderLabel ( array $radio, false | string | array $label, string $input, Cake\View\Form\ContextInterface $context, boolean $escape ) : string Renders a label element for a given radio button.

Method Details

_renderLabel() protected method

In the future this might be refactored into a separate widget as other input types (multi-checkboxes) will also need labels generated.
protected _renderLabel ( array $radio, false | string | array $label, string $input, Cake\View\Form\ContextInterface $context, boolean $escape ) : string
$radio array The input properties.
$label false | string | array The properties for a label.
$input string The input widget.
$context Cake\View\Form\ContextInterface The form context.
$escape boolean Whether or not to HTML escape the label.
return string Generated label.

render() public method

Data supports the following keys: - name - Set the input name. - inline - The alignement to use. - options - An array of options. See below for more information. - disabled - Either true or an array of inputs to disable. When true, the select element will be disabled. - val - A string of the option to mark as selected. - label - Either false to disable label generation, or an array of attributes for all labels. - required - Set to true to add the required attribute on all generated radios. - idPrefix Prefix for generated ID attributes.
public render ( array $data, Cake\View\Form\ContextInterface $context ) : string
$data array The data to build radio buttons with.
$context Cake\View\Form\ContextInterface The current form context.
return string

Property Details

$_inline protected_oe property

Set on RadioWidget::render() to tell RadioWidget::_renderLabel() that we want to have inline aligned radios.
protected bool $_inline
return boolean