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;
    }