Difference between revisions of "JHtmlGrid/published"
From Joomla! Documentation
< API16:JHtmlGrid
(New page:
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
{{Description:JHtmlGrid/published}...) |
m (removing red link to edit, no existant pages) |
||
Line 1: | Line 1: | ||
− | |||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
− | <nowiki>[< | + | <nowiki>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Syntax=== | ===Syntax=== | ||
Line 63: | Line 62: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
− | <nowiki>[< | + | <nowiki>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Examples=== | ===Examples=== | ||
Line 78: | Line 77: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
+ | [[Category:Archived pages API16]] |
Revision as of 21:57, 13 May 2013
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 edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax[edit]
static published($value, $i, $img1= 'tick.png', $img0= 'publish_x.png', $prefix='')
Parameter Name | Default Value | Description |
---|---|---|
$value | $value Either the scalar value, or an object (for backward compatibility, deprecated) | |
$i | $i | |
$img1 | 'tick.png' | $img1 Image for a positive or on value |
$img0 | 'publish_x.png' | $img0 Image for the empty or off value |
$prefix | $prefix An optional prefix for the task |
Defined in[edit]
libraries/joomla/html/html/grid.php
Importing[edit]
jimport( 'joomla.html.html.grid' );
Source Body[edit]
public static function published($value, $i, $img1 = 'tick.png', $img0 = 'publish_x.png', $prefix='')
{
if (is_object($value)) {
$value = $value->published;
}
$img = $value ? $img1 : $img0;
$task = $value ? 'unpublish' : 'publish';
$alt = $value ? JText::_('Published') : JText::_('Unpublished');
$action = $value ? JText::_('UNPUBLISH_ITEM') : JText::_('PUBLISH_ITEM');
$href = '
<a href="javascript:void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $prefix.$task .'\')" title="'. $action .'">'.
JHTML::_('image','admin/'.$img, $alt, array('border' => 0), true).'</a>'
;
return $href;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples[edit]
<CodeExamplesForm />