API15

JHTMLGrid/state

< API15:JHTMLGrid

The "API15" 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 edit link to red link >]

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

Syntax

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

function state( $filter_state='*', $published='Published', $unpublished='Unpublished', $archived=NULL, $trashed=NULL )
{
        $state[] = JHTML::_('select.option',  '', '- '. JText::_( 'Select State' ) .' -' );
        //Jinx : Why is this used ?
        //$state[] = JHTML::_('select.option',  '*', JText::_( 'Any' ) );
        $state[] = JHTML::_('select.option',  'P', JText::_( $published ) );
        $state[] = JHTML::_('select.option',  'U', JText::_( $unpublished ) );

        if ($archived) {
                $state[] = JHTML::_('select.option',  'A', JText::_( $archived ) );
        }

        if ($trashed) {
                $state[] = JHTML::_('select.option',  'T', JText::_( $trashed ) );
        }

        return JHTML::_('select.genericlist',   $state, 'filter_state', 'class="inputbox" size="1" onchange="submitform( );"', 'value', 'text', $filter_state );
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

Code Examples


Advertisement