API16:JHtmlGrid/state
From Joomla! Documentation
Template:Description:JHtmlGrid/state
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
)
);
}
[Edit See Also] Template:SeeAlso:JHtmlGrid/state
Examples
<CodeExamplesForm />