API16

JHtmlAccess/assetgrouplist

< API16:JHtmlAccess

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

Displays a Select list of the available asset groups


<! removed transcluded page call, red link never existed >

Syntax

static assetgrouplist($name, $selected, $attribs=null, $config=array())
Parameter Name Default Value Description
$name $name The name of the select element
$selected $selected The selected asset group id
$attribs null $attribs Optional attributes for the select field
$config array() $config An array of options for the control

Returns

mixed An HTML string or null if an error occurs

Defined in

libraries/joomla/html/html/access.php

Importing

jimport( 'joomla.html.html.access' );

Source Body

public static function assetgrouplist($name, $selected, $attribs = null, $config = array())
{
        static $count;

        $options = JHtmlAccess::assetgroups();
        if (isset($config['title'])) {
                array_unshift($options, JHtml::_('select.option', '', $config['title']));
        }

        return JHtml::_(
                'select.genericlist',
                $options,
                $name,
                array(
                        'id' =>                         isset($config['id']) ? $config['id'] : 'assetgroups_'.++$count,
                        'list.attr' =>          (is_null($attribs) ? 'class="inputbox" size="3"' : $attribs),
                        'list.select' =>        (int) $selected,
                        'list.translate' => true
                )
        );
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples


Advertisement