code/template/helper/listbox.php
public function enabled( $config = array())
    {
        $config = new ObjectConfigJson($config);
        $config->append(array(
            'name'      => 'enabled',
            'attribs'   => array(),
            'deselect'  => true,
        ))->append(array(
            'selected'  => $config->{$config->name}
        ));

        $translator = $this->getObject('translator');
        $options    = array();

        $options[] = $this->option(array('label' => $translator->translate( 'Enabled' ) , 'value' => 1 ));
        $options[] = $this->option(array('label' => $translator->translate( 'Disabled' ), 'value' => 0 ));

        //Add the options to the config object
        $config->options = $options;

        return $this->optionlist($config);
    }
public function enabled( $config = array())
    {
        $config = new ObjectConfigJson($config);
        $config->append(array(
            'name'      => 'enabled',
            'attribs'   => array(),
            'deselect'  => true,
        ))->append(array(
            'selected'  => $config->{$config->name}
        ));

        $translator = $this->getObject('translator');
        $options    = array();

        $options[] = $this->option(array('label' => $translator->translate( 'Enabled' ) , 'value' => 1 ));
        $options[] = $this->option(array('label' => $translator->translate( 'Disabled' ), 'value' => 0 ));

        //Add the options to the config object
        $config->options = $options;

        return $this->optionlist($config);
    }
public function enabled ( $ config = array ( ) ) { $ config = new ObjectConfigJson ( $ config ) ; $ config -> append ( array ( 'name' => 'enabled' , 'attribs' => array ( ) , 'deselect' => true , ) ) -> append ( array ( 'selected' => $ config -> { $ config -> name } ) ) ; $ translator = $ this -> getObject ( 'translator' ) ; $ options = array ( ) ; $ options [ ] = $ this -> option ( array ( 'label' => $ translator -> translate ( 'Enabled' ) , 'value' => 1 ) ) ; $ options [ ] = $ this -> option ( array ( 'label' => $ translator -> translate ( 'Disabled' ) , 'value' => 0 ) ) ; //Add the options to the config object $ config -> options = $ options ; return $ this -> optionlist ( $ config ) ; }
Generates an HTML enabled listbox

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