本文整理匯總了PHP中JAccess::get_group_children方法的典型用法代碼示例。如果您正苦於以下問題:PHP JAccess::get_group_children方法的具體用法?PHP JAccess::get_group_children怎麽用?PHP JAccess::get_group_children使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JAccess
的用法示例。
在下文中一共展示了JAccess::get_group_children方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
function get_group_children($var_1 = null, $var_2 = null, $var_3 = null)
{
global $_CB_database;
if (!$var_3) {
$var_3 = 'NO_RECURSE';
}
if (checkJversion() == 2) {
$query = 'SELECT g1.' . $_CB_database->NameQuote('id') . "\n FROM " . $_CB_database->NameQuote('#__usergroups') . " AS g1";
if ($var_3 == 'RECURSE') {
$query .= "\n LEFT JOIN " . $_CB_database->NameQuote('#__usergroups') . " AS g2" . ' ON g2.' . $_CB_database->NameQuote('lft') . ' < g1.' . $_CB_database->NameQuote('lft') . ' AND g2.' . $_CB_database->NameQuote('rgt') . ' > g1.' . $_CB_database->NameQuote('rgt') . "\n WHERE g2." . $_CB_database->NameQuote('id') . " = " . (int) $var_1;
} else {
$query .= "\n WHERE g1." . $_CB_database->NameQuote('parent_id') . " = " . (int) $var_1;
}
$query .= "\n ORDER BY g1." . $_CB_database->NameQuote('title');
$_CB_database->setQuery($query);
$return = $_CB_database->loadResultArray();
} else {
if (!$var_2) {
$var_2 = 'ARO';
}
$return = $this->_acl->get_group_children($var_1, $var_2, $var_3);
}
return $return;
}