Actions

API16

JHtmlGrid/state

From Joomla! Documentation

< API16:JHtmlGrid
Revision as of 21:57, 13 May 2013 by JoomlaWikiBot (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.

[<! removed edit link to red link >]

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

Contents

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 edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />