';
}
$html[] = JHtml::_('tabs.end');
// Build the footer with legend and special purpose buttons.
$html[] = ' ';
$html[] = '
';
$html[] = '
' . JText::_('JLIB_RULES_ALLOWED') . '
';
$html[] = '
' . JText::_('JLIB_RULES_DENIED') . '
';
$html[] = '
';
$html[] = '';
return implode("\n", $html);
}
/**
* Get the id of the parent asset
*
* @param integer $assetId The asset for which the parentid will be returned
*
* @return integer The id of the parent asset
*
* @since 1.6
*/
protected static function _getParentAssetId($assetId)
{
// Get a database object.
$db = JFactory::getDbo();
$query = $db->getQuery(true);
// Get the user groups from the database.
$query->select($db->quoteName('parent_id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('id') . ' = ' . (int) $assetId);
$db->setQuery($query);
return (int) $db->loadResult();
}
/**
* Get the user groups
*
* @return array Array of user groups
*
* @since 1.6
*/
protected static function _getUserGroups()
{
// Get a database object.
$db = JFactory::getDbo();
// Get the user groups from the database.
$db->setQuery(
'SELECT a.id AS value, a.title AS text, b.id as parent'
. ' FROM #__usergroups AS a LEFT JOIN #__usergroups AS b ON a.lft >= b.lft AND a.rgt <= b.rgt'
. ' ORDER BY a.lft ASC, b.lft ASC'
);
$result = $db->loadObjectList();
$options = array();
// Pre-compute additional values.
foreach ($result as $option)
{
$end = end($options);
if ($end === false || $end->value != $option->value)
{
$end = $option;
$end->level = 0;
$options[] = $end;
}
else
{
$end->level++;
}
$end->identities[] = $option->parent;
}
return $options;
}
/**
* Get the array of images associate with specific permissions
*
* @return array An associative array of permissions and images
*
* @since 1.6
*/
protected static function _getImagesArray()
{
$images['allow-l'] = '';
$images['deny-l'] = '';
$images['allow'] = '';
$images['deny'] = '';
$images['allow-i'] = '';
$images['deny-i'] = '';
return $images;
}
}