API16

JHtmlGrid/checkedOut: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
No edit summary
m preparing for archive only
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<! removed transcluded page call, red link never existed >
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JHtmlGrid/checkedOut|Edit Descripton]]<nowiki>]</nowiki>
</span>
 
{{Description:JHtmlGrid/checkedOut}}


===Syntax===
===Syntax===
Line 61: Line 56:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JHtmlGrid/checkedOut|Edit See Also]]<nowiki>]</nowiki>
<! removed transcluded page call, red link never existed >
</span>
{{SeeAlso:JHtmlGrid/checkedOut}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=checkedOut
  category=checkedOut
  category=JHtmlGrid
  category=JHtmlGrid
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API16]]

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