API15:JHTMLGrid/state
From Joomla! Documentation
[<! 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