예제 #1
0
	/**
	 * Customized to add a few attributes.
	 * 
	 * @param 	array 	An optional array with configuration options
	 * @return	string	Html
	 * @see __call()
	 */
	protected function _listbox($config = array())
 	{
		$config = new KConfig($config);
		
		$config->append(array(
			'filter' => array(
				'application' => $config->application
			)
		));

		return parent::_listbox($config);
 	}
예제 #2
0
 public function users($config = array())
 {
     $config = new KConfig($config);
     $config->append(array('autocomplete' => true, 'validate' => false, 'model' => 'users', 'url' => JRoute::_('index.php?option=com_logman&view=users&format=json', false), 'attribs' => array('size' => 30, 'class' => 'span2')));
     //@TODO : Fix - Forcing config option because of name collisions
     $config->name = 'user';
     $config->text = 'name';
     //@TODO : Note - Future support for matching by email + username will need a autocomplete.js refactor/workaround
     //               as Meio.Autocomplete.Filter._getValueFromKeys() isn't working as advertised.
     //$config->text = 'email.username.name';
     $config->sort = 'name';
     /* the str_replace is necessary as no line breaks or white space can be between the icon and the input or you'll have an ugly gap */
     return str_replace(array('	', "\n"), '', parent::_render($config));
 }
 /**
  * Generates an HTML access listbox
  *
  * @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', 'attribs' => array(), 'deselect' => true, 'prompt' => '- ' . $this->translate('Select') . ' -'))->append(array('selected' => $config->{$config->name}));
     if (version_compare(JVERSION, '1.6', '<')) {
         $html = parent::access();
     } else {
         $prompt = false;
         if ($config->deselect) {
             $prompt = array((object) array('value' => '', 'text' => $config->prompt));
         }
         $html = JHtml::_('access.level', $config->name, $config->selected, $config->attribs->toArray(), $prompt);
     }
     return $html;
 }
예제 #4
0
 /**
  * Generates status list box
  * 
  * @param array $config [optional]
  * 
  * @return html
  */
 public function listbox(array $config = array())
 {
     $config = new KObjectConfig($config);
     $config->append(array('options' => $this->getConfig()->status, 'filter' => array()));
     return parent::optionlist($config);
 }