<commit_before><?php
/**
 * @version     $Id$
 * @category	Koowa
 * @package     Koowa_Components
 * @subpackage  Default
 * @copyright   Copyright (C) 2007 - 2010 <NAME> and <NAME>. All rights reserved.
 * @license     GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
 * @link        http://www.koowa.org
 */

/**
 * Default Paginator Helper
.*
 * @author		<NAME> <<EMAIL>>
 * @category	Koowa
 * @package     Koowa_Components
 * @subpackage  Default
 */

class ComDefaultHelperListbox extends KTemplateHelperListbox
{
	/**
	 * Generates an HTML enabled optionlist
	 *
	 * @param 	array 	An optional array with configuration options
	 * @return	string	Html
	 */
	public function enabled( $config = array())
	{
		$config = new KConfig($config);
		$config->append(array(
			'name'		=> 'enabled',
			'state' 	=> null,
			'attribs'	=> array(),
			'deselect'	=> true
		));
		
		$options = array();
		
		if($config->select) {
			$options[] = $this->option(array('text' => '- '.JText::_( 'Select' ).' -', 'value' => ''));
		}
		
		$options[] = $this->option(array('text' => JText::_( 'Enabled' ) , 'value' => 1 ));
		$options[] = $this->option(array('text' => JText::_( 'Disabled' ), 'value' => 0 ));

		$list = $this->optionlist(array(
			'options' 	=> $options, 
			'name' 		=> $config->name, 
			'attribs' 	=> $config->attribs, 
			'selected' 	=> $config->state->{$config->name},
		));
		
		return $list;
	}
	
	/**
	 * Generates an HTML access optionlist
	 *
	 * @param 	array 	An optional array with configuration options
	 * @return	string	Html
	 */
	public function access($config = array())
 	{
		$config = new KConfig($config);
		$config->append(array(
			'name'		=> 'access',
			'state' 	=> null,
			'attribs'	=> array(),
			'deselect'	=> true
		));
		
 		$options   = array();
 		<commit_msg>Added published listbox helper.<commit_after><?php
/**
 * @version     $Id$
 * @category	Koowa
 * @package     Koowa_Components
 * @subpackage  Default
 * @copyright   Copyright (C) 2007 - 2010 <NAME> and <NAME>. All rights reserved.
 * @license     GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
 * @link        http://www.koowa.org
 */

/**
 * Default Paginator Helper
.*
 * @author		<NAME> <<EMAIL>>
 * @category	Koowa
 * @package     Koowa_Components
 * @subpackage  Default
 */

class ComDefaultHelperListbox extends KTemplateHelperListbox
{
	/**
	 * Generates an HTML enabled optionlist
	 *
	 * @param 	array 	An optional array with configuration options
	 * @return	string	Html
	 */
	public function enabled( $config = array())
	{
		$config = new KConfig($config);
		$config->append(array(
			'name'		=> 'enabled',
			'state' 	=> null,
			'attribs'	=> array(),
			'deselect'	=> true
		));
		
		$options = array();
		
		if($config->select) {
			$options[] = $this->option(array('text' => '- '.JText::_( 'Select' ).' -', 'value' => ''));
		}
		
		$options[] = $this->option(array('text' => JText::_( 'Enabled' ) , 'value' => 1 ));
		$options[] = $this->option(array('text' => JText::_( 'Disabled' ), 'value' => 0 ));

		$list = $this->optionlist(array(
			'options' 	=> $options, 
			'name' 		=> $config->name, 
			'attribs' 	=> $config->attribs, 
			'selected' 	=> $config->state->{$config->name},
		));
		
		return $list;
	}
	
	/**
	 * Generates an HTML published optionlist
	 *
	 * @param 	array 	An optional array with configuration options
	 * @return	string	Html
	 */
	public function published( $config = array())
	{
		$config = new KConfig($config);
		$config->append(array(
			'name'		=> 'enabled',
			'state' 	=> null,
			'attribs'	=> array(),
			'deselect'	=> true
		));
		
		$options = array();
		
		if($config->select) {
			$options[] = $this->option(array('text' => '- '.JText::_( 'Select' ).' -', 'value' => ''));
		}
		
		$options[] = $this->option(array('text' => JText::_( 'Published' ) , 'value' => 1 ));
		$options[] = $this->option(array('text' => JText::_( 'Draft' ), 'value' => 0 ));

		$list = $this->optionlist(array(
			'options' 	=> $options, 
			'name' 		=> $config->name, 
			'attribs' 	=> $config->attribs, 
			'selected' 	=> $config->state->{$config->name},
		));
		
		return $list;
	}
	
	/**
	 * Generates an HTML access optionlist
	 *
	 * @param 	array 	An optional array with configuration options
	 * @return	string	Html
	 */
	public function access($config = array())
 	{
		$config = new KConfig($config);
		$config->append(array(
			'name'		=> 'access',
			'state' 	=> null,
			'attribs'	=> array(),
			'deselect'	=> true
		));
		
 		$options   = array();
 		
{'fraction_non_alphanumeric': 0.19836716681376876, 'fraction_numerical': 0.00617828773168579, 'mean_word_length': 3.11716621253406, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 100, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3107517', 'n_tokens_mistral': 1808, 'n_tokens_neox': 1590, 'n_words': 350}