API16

JHtmlGrid/access

From Joomla! Documentation

< API16:JHtmlGrid
Revision as of 21:57, 13 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

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.

Description[edit]

Deprecated

[<! removed edit link to red link >]

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

Syntax[edit]

static 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]

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[edit]

<CodeExamplesForm />