API16

JHtmlGrid/access: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
No edit summary
m removing red link to edit, no existant pages
Line 3: Line 3:


<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JHtmlGrid/access|Edit Descripton]]<nowiki>]</nowiki>
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
</span>


{{Description:JHtmlGrid/access}}
<! removed transcluded page call, red link never existed >


===Syntax===
===Syntax===
Line 68: Line 68:


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


===Examples===
===Examples===
Line 83: Line 83:
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API16]]

Revision as of 02:57, 14 May 2013

Description

Deprecated

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

static access(&$row, $i, $archived=NULL)
Parameter Name Default Value Description
&$row
$i
$archived NULL

Defined in

libraries/joomla/html/html/grid.php

Importing

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

Source Body

public static function access(&$row, $i, $archived = NULL)
{
        // TODO: This needs to be reworked to suit the new access levels
        if ($row->access <= 1)  {
                $color_access = 'class="allow"';
                $task_access = 'accessregistered';
        } else if ($row->access == 1) {
                $color_access = 'class="deny"';
                $task_access = 'accessspecial';
        } else {
                $color_access = 'class="none"';
                $task_access = 'accesspublic';
        }

        if ($archived == -1)
        {
                $href = JText::_($row->groupname);
        }
        else
        {
                $href = '
                <a href="javascript:void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $task_access .'\')" '. $color_access .'>
                '. JText::_($row->groupname) .'</a>'
                ;
        }

        return $href;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />