Back to Access class

Method assetgrouplist

public static mixed
assetgrouplist
(mixed $name, mixed $selected, mixed $attribs = null, mixed $config = array())
Displays a Select list of the available asset groups
Parameters
  • string $name The name of the select element
  • mixed $selected The selected asset group id
  • string $attribs Optional attributes for the select field
  • array $config An array of options for the control
Returns
  • mixed An HTML string or null if an error occurs
Since
  • 1.6
Class: Access
Project: Joomla

Method assetgrouplist - Source code

/**
 * Displays a Select list of the available asset groups
 *
 * @param   string  $name      The name of the select element
 * @param   mixed   $selected  The selected asset group id
 * @param   string  $attribs   Optional attributes for the select field
 * @param   array   $config    An array of options for the control
 *
 * @return  mixed  An HTML string or null if an error occurs
 *
 * @since   1.6
 */
public static function assetgrouplist($name, $selected, $attribs = null, $config = array())
{
    static $count;
    $options = static::assetgroups();
    if (isset($config['title'])) {
        array_unshift($options, HTMLHelper::_('select.option', '', $config['title']));
    }
    return HTMLHelper::_('select.genericlist', $options, $name, array('id' => isset($config['id']) ? $config['id'] : 'assetgroups_' . ++$count, 'list.attr' => $attribs === null ? 'class="inputbox" size="3"' : $attribs, 'list.select' => (int) $selected));
}