Set of radio buttons

class Nos\Renderer_Radioset
Extends Nos\Renderer.
This renderer is used to display a set of radio buttons.
Set of radio buttons UI

Configuration

property Nos\Renderer_Radioset::$name

Name for the radio input.

property Nos\Renderer_Radioset::$choices

List of radio buttons. Key is the value and value is an array.

label:Text or image to display around the radio button
side_label:Text on the side for the selected option
property Nos\Renderer_Radioset::$value

Value of the selected input.

property Nos\Renderer_Radioset::$class

Class for the container div.

Example

Adding set of radio button in a CRUD form configuration:

<?php

return array(
    'label' => __('Status:'),
    'renderer' => '\Nos\Renderer_Radioset',
    'renderer_options' => array(
        'choices' => array(
            'refused' => array(
                'label' => '<img src="static/novius-os/admin/novius-os/img/icons/status-red.png" />',
                'side_label' => __('Refused'),
            ),
            'pending' => array(
                'label' => '<img src="static/apps/noviusos_comments/img/status-orange.png" />',
                'side_label' => __('Pending'),
            ),
            'published' => array(
                'label' => '<img src="static/novius-os/admin/novius-os/img/icons/status-green.png" />',
                'side_label' => __('Published'),
            ),
        ),
        'class' => 'flat',
    ),
);
Read the Docs v: elche
Versions
latest
stable
elche
dubrovka
chiba.2
chiba.1
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.