code/libraries/joomlatools/library/template/helper/select.php
public function booleanlist($config = array())
    {
        $translator = $this->getObject('translator');

        $config = new KObjectConfigJson($config);
        $config->append(array(
            'name'   	=> '',
            'attribs'	=> array(),
            'true'		=> $translator->translate('Yes'),
            'false'		=> $translator->translate('No'),
            'selected'	=> null,
            'translate'	=> true
        ));

        $name    = $config->name;
        $attribs = $this->buildAttributes($config->attribs);

        $html  = array();

        $html[] = '<div class="k-optionlist k-optionlist--boolean">';
        $html[] = '<div class="k-optionlist__content">';

        $extra = $config->selected ? 'checked="checked"' : '';
        $text  = $config->translate ? $translator->translate( $config->true ) : $config->true;

        $html[] = '<input type="radio" name="'.$name.'" id="'.$name.'1" value="1" '.$extra.' '.$attribs.' />';
        $html[] = '<label for="'.$name.'1"><span>'.$text.'</span></label>';

        $extra = !$config->selected ? 'checked="checked"' : '';
        $text  = $config->translate ? $translator->translate( $config->false ) : $config->false;

        $html[] = '<input type="radio" name="'.$name.'" id="'.$name.'0" value="0" '.$extra.' '.$attribs.' />';
        $html[] = '<label for="'.$name.'0"><span>'.$text.'</span></label>';

        $html[] = '<div class="k-optionlist__focus"></div>';
        $html[] = '</div>';
        $html[] = '</div>';

        return implode(PHP_EOL, $html);
    }
public function booleanlist($config = array())
    {
        $translator = $this->getObject('translator');

        $config = new KObjectConfigJson($config);
        $config->append(array(
            'name'   	=> '',
            'attribs'	=> array(),
            'true'		=> $translator->translate('Yes'),
            'false'		=> $translator->translate('No'),
            'selected'	=> null,
            'translate'	=> true
        ));

        $name    = $config->name;
        $attribs = $this->buildAttributes($config->attribs);

        $html  = array();

        $html[] = '<div class="k-optionlist k-optionlist--boolean">';
        $html[] = '<div class="k-optionlist__content">';

        $extra = $config->selected ? 'checked="checked"' : '';
        $text  = $config->translate ? $translator->translate( $config->true ) : $config->true;

        $html[] = '<input type="radio" name="'.$name.'" id="'.$name.'1" value="1" '.$extra.' '.$attribs.' />';
        $html[] = '<label for="'.$name.'1"><span>'.$text.'</span></label>';

        $extra = !$config->selected ? 'checked="checked"' : '';
        $text  = $config->translate ? $translator->translate( $config->false ) : $config->false;

        $html[] = '<input type="radio" name="'.$name.'" id="'.$name.'0" value="0" '.$extra.' '.$attribs.' />';
        $html[] = '<label for="'.$name.'0"><span>'.$text.'</span></label>';

        $html[] = '<div class="k-optionlist__focus"></div>';
        $html[] = '</div>';
        $html[] = '</div>';

        return implode(PHP_EOL, $html);
    }
public function booleanlist ( $ config = array ( ) ) { $ translator = $ this -> getObject ( 'translator' ) ; $ config = new KObjectConfigJson ( $ config ) ; $ config -> append ( array ( 'name' => '' , 'attribs' => array ( ) , 'true' => $ translator -> translate ( 'Yes' ) , 'false' => $ translator -> translate ( 'No' ) , 'selected' => null , 'translate' => true ) ) ; $ name = $ config -> name ; $ attribs = $ this -> buildAttributes ( $ config -> attribs ) ; $ html = array ( ) ; $ html [ ] = '<div class="k-optionlist k-optionlist--boolean">' ; $ html [ ] = '<div class="k-optionlist__content">' ; $ extra = $ config -> selected ? 'checked="checked"' : '' ; $ text = $ config -> translate ? $ translator -> translate ( $ config -> true ) : $ config -> true ; $ html [ ] = '<input type="radio" name="' . $ name . '" id="' . $ name . '1" value="1" ' . $ extra . ' ' . $ attribs . ' />' ; $ html [ ] = '<label for="' . $ name . '1"><span>' . $ text . '</span></label>' ; $ extra = ! $ config -> selected ? 'checked="checked"' : '' ; $ text = $ config -> translate ? $ translator -> translate ( $ config -> false ) : $ config -> false ; $ html [ ] = '<input type="radio" name="' . $ name . '" id="' . $ name . '0" value="0" ' . $ extra . ' ' . $ attribs . ' />' ; $ html [ ] = '<label for="' . $ name . '0"><span>' . $ text . '</span></label>' ; $ html [ ] = '<div class="k-optionlist__focus"></div>' ; $ html [ ] = '</div>' ; $ html [ ] = '</div>' ; return implode ( PHP_EOL , $ html ) ; }
Generates an HTML boolean radio list

@param   array|KObjectConfig     $config An optional array with configuration options
@return  string  Html
Generates an HTML boolean radio list