Difference between revisions of "JHTMLGrid/access"
From Joomla! Documentation
< API15:JHTMLGrid
m (→Examples: adding categories) |
|||
Line 80: | Line 80: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
+ | |||
+ | [[Category:Archived pages API15]][[Category:Security mod error page]] |
Revision as of 20:49, 12 May 2013
The "API15" 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.
Template:Description:JHTMLGrid/access
Syntax[edit]
access(&$row, $i, $archived=NULL)
Parameter Name | Default Value | Description |
---|---|---|
&$row | ||
$i | ||
$archived | NULL |
Defined in[edit]
libraries/joomla/html/html/grid.php
Importing[edit]
jimport( 'joomla.html.html.grid' );
Source Body[edit]
function access( &$row, $i, $archived = NULL )
{
if ( !$row->access ) {
$color_access = 'style="color: green;"';
$task_access = 'accessregistered';
} else if ( $row->access == 1 ) {
$color_access = 'style="color: red;"';
$task_access = 'accessspecial';
} else {
$color_access = 'style="color: black;"';
$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[edit]
<CodeExamplesForm />