API16

JHtmlGrid/state

< API16:JHtmlGrid

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.

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

Syntax

static state($filter_state= '*', $published= 'Published', $unpublished= 'Unpublished', $archived=null, $trashed=null)
Parameter Name Default Value Description
$filter_state '*'
$published 'Published'
$unpublished 'Unpublished'
$archived null
$trashed null

Defined in

libraries/joomla/html/html/grid.php

Importing

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

Source Body

public static function state(
        $filter_state = '*',
        $published = 'Published',
        $unpublished = 'Unpublished',
        $archived = null,
        $trashed = null
) {
        $state = array(
                '' => '- ' . JText::_('SELECT_STATE') . ' -',
                'P' => JText::_($published),
                'U' => JText::_($unpublished)
        );

        if ($archived) {
                $state['A'] = JText::_($archived);
        }

        if ($trashed) {
                $state['T'] = JText::_($trashed);
        }

        return JHtml::_(
                'select.genericlist',
                $state,
                'filter_state',
                array(
                        'list.attr' => 'class="inputbox" size="1" onchange="submitform();"',
                        'list.select' => $filter_state,
                        'option.key' => null
                )
        );
}


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

Examples

Code Examples


Advertisement