Actions

API16

JHtmlAccess/assetgrouplist

From Joomla! Documentation

< API16:JHtmlAccess
Revision as of 17:34, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Displays a Select list of the available asset groups

[Edit Descripton]

Description:JHtmlAccess/assetgrouplist

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

[Edit See Also] SeeAlso:JHtmlAccess/assetgrouplist

Examples

<CodeExamplesForm />