API16

JHtmlGrid/checkedOut

From Joomla! Documentation

< API16:JHtmlGrid
Revision as of 05:15, 30 March 2010 by Doxiki (talk | contribs)

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.

[Edit Descripton]

Template:Description:JHtmlGrid/checkedOut

Syntax[edit]

static checkedOut(&$row, $i, $identifier= 'id')
Parameter Name Default Value Description
&$row
$i
$identifier 'id'

Defined in[edit]

libraries/joomla/html/html/grid.php

Importing[edit]

jimport( 'joomla.html.html.grid' );

Source Body[edit]

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;
}

[Edit See Also] Template:SeeAlso:JHtmlGrid/checkedOut

Examples[edit]

<CodeExamplesForm />