code/libraries/joomlatools/component/koowa/template/helper/listbox.php
public function access($config = array())
    {
        $config = new KObjectConfigJson($config);
        $config->append(array(
            'name'      => 'access',
            'attribs'   => array(),
            'deselect_value' => '',
            'deselect'  => true,
            'select2' => false,
            'prompt'    => '- '.$this->getObject('translator')->translate('Select').' -'
        ))->append(array(
            'selected'  => $config->{$config->name}
        ));

        $prompt = false;

        // without &nbsp; Joomla strips the last hyphen of the prompt
        if ($config->deselect)  {
            $prompt = array((object) array('value' => $config->deselect_value, 'text'  => $config->prompt.'&nbsp;'));
        }

        $html = JHtml::_('access.level', $config->name, $config->selected, $config->attribs->toArray(), $prompt);

        if ($config->select2)
        {
            $html .= $this->getTemplate()->helper('behavior.select2', array(
                'element' => 'select[name=\"'.$config->name.'\"]'
            ));
        }
    
        return $html;
    }
public function access($config = array())
    {
        $config = new KObjectConfigJson($config);
        $config->append(array(
            'name'      => 'access',
            'attribs'   => array(),
            'deselect_value' => '',
            'deselect'  => true,
            'select2' => false,
            'prompt'    => '- '.$this->getObject('translator')->translate('Select').' -'
        ))->append(array(
            'selected'  => $config->{$config->name}
        ));

        $prompt = false;

        // without &nbsp; Joomla strips the last hyphen of the prompt
        if ($config->deselect)  {
            $prompt = array((object) array('value' => $config->deselect_value, 'text'  => $config->prompt.'&nbsp;'));
        }

        $html = JHtml::_('access.level', $config->name, $config->selected, $config->attribs->toArray(), $prompt);

        if ($config->select2)
        {
            $html .= $this->getTemplate()->helper('behavior.select2', array(
                'element' => 'select[name=\"'.$config->name.'\"]'
            ));
        }
    
        return $html;
    }
public function access ( $ config = array ( ) ) { $ config = new KObjectConfigJson ( $ config ) ; $ config -> append ( array ( 'name' => 'access' , 'attribs' => array ( ) , 'deselect_value' => '' , 'deselect' => true , 'select2' => false , 'prompt' => '- ' . $ this -> getObject ( 'translator' ) -> translate ( 'Select' ) . ' -' ) ) -> append ( array ( 'selected' => $ config -> { $ config -> name } ) ) ; $ prompt = false ; // without &nbsp; Joomla strips the last hyphen of the prompt if ( $ config -> deselect ) { $ prompt = array ( ( object ) array ( 'value' => $ config -> deselect_value , 'text' => $ config -> prompt . '&nbsp;' ) ) ; } $ html = JHtml :: _ ( 'access.level' , $ config -> name , $ config -> selected , $ config -> attribs -> toArray ( ) , $ prompt ) ; if ( $ config -> select2 ) { $ html .= $ this -> getTemplate ( ) -> helper ( 'behavior.select2' , array ( 'element' => 'select[name=\"' . $ config -> name . '\"]' ) ) ; } return $ html ; }
Generates an HTML access listbox

@param   array   $config An optional array with configuration options
@return  string  Html
Generates an HTML access listbox