JHtmlGrid/access: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Deprecated
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
{{Descr... |
No edit summary |
||
Line 17: | Line 17: | ||
!Description | !Description | ||
|- | |- | ||
| | | &$row | ||
| | | | ||
| | | |
Revision as of 10:15, 30 March 2010
Description
Deprecated
Template:Description:JHtmlGrid/access
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;
}
[Edit See Also] Template:SeeAlso:JHtmlGrid/access
Examples
<CodeExamplesForm />