JHtmlGrid/checkedOut: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 60: | Line 60: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=checkedOut | category=checkedOut | ||
category=JHtmlGrid | category=JHtmlGrid | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 01:45, 25 March 2017
<! removed transcluded page call, red link never existed >
Syntax
static checkedOut(&$row, $i, $identifier= 'id')
| Parameter Name | Default Value | Description |
|---|---|---|
| &$row | ||
| $i | ||
| $identifier | 'id' |
Defined in
libraries/joomla/html/html/grid.php
Importing
jimport( 'joomla.html.html.grid' );
Source Body
public static function checkedOut(&$row, $i, $identifier = 'id')
{
$user = &JFactory::getUser();
$userid = $user->get('id');
$result = false;
if ($row INSTANCEOF JTable) {
$result = $row->isCheckedOut($userid);
} else {
$result = JTable::isCheckedOut($userid, $row->checked_out);
}
$checked = '';
if ($result) {
$checked = JHtmlGrid::_checkedOut($row);
} else {
if ($identifier == 'id')
$checked = JHtml::_('grid.id', $i, $row->$identifier);
else
$checked = JHtml::_('grid.id', $i, $row->$identifier, $result, $identifier);
}
return $checked;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples