本文整理汇总了PHP中Groups::getAllGroups方法的典型用法代码示例。如果您正苦于以下问题:PHP Groups::getAllGroups方法的具体用法?PHP Groups::getAllGroups怎么用?PHP Groups::getAllGroups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Groups
的用法示例。
在下文中一共展示了Groups::getAllGroups方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlentities
$tree->name = 'Users';
$tree->nodeType = "base";
$tree->width = "350px";
$tree->value = '
<div class="boxTopBlue"><div class="a"></div><div class="b"></div><div class="c"></div></div>
<div class="boxContentBlue">
<table width="100%" style="margin:0px;" cellspacing="0" cellpadding="0">
<tr>
<td class="userGroupTitle">' . G::loadTranslation("ID_ASSIGN_GROUP_TO") . ' ' . $aRow['USR_FIRSTNAME'] . ' ' . $aRow['USR_LASTNAME'] . '</td>
</tr>
</table>
</div>
<div class="boxBottomBlue"><div class="a"></div><div class="b"></div><div class="c"></div></div>
<div class="userGroupLink"><a href="#" onclick="showUserGroups(\'' . $_GET['sUserUID'] . '\');return false;">' . G::LoadTranslation('ID_BACK_TO_GROUP_LIST') . '</a></div>';
$tree->showSign = false;
$allGroups = $groups->getAllGroups();
foreach ($allGroups as $group) {
$ID_ASSIGN = G::LoadTranslation('ID_ASSIGN');
$groupUID = htmlentities($group->getGrpUid());
$userUID = $_GET['sUserUID'];
$GROUP_TITLE = strip_tags($group->getGrpTitle());
$html = <<<innerHTML
\t <table cellspacing='0' cellpadding='0' border='1' style='border:0px;'>
\t <tr>
\t <td width='250px' class='treeNode' style='border:0px;background-color:transparent;'>{$GROUP_TITLE}</td>\t
\t <td class='treeNode' style='border:0px;background-color:transparent;'>[<a href="#" onclick="saveUserGroup('{$groupUID}','{$userUID}');return false;">{$ID_ASSIGN}</a>]</td>
\t </tr>
\t </table>
innerHTML;
$ch =& $tree->addChild($group->getGrpUid(), $html, array('nodeType' => 'child'));
$ch->point = '<img src="/images/users.png" />';
示例2: Groups
<?php
require_once '../classes/db/Groups.php';
require_once '../classes/Helper.php';
Helper::checkAuthorisation();
if ($_GET) {
$groups = new Groups();
switch ($_GET['type']) {
case 'id':
Helper::checkGetParameter('id');
$group = $groups->getGroup($_GET['id']);
echo json_encode($group);
break;
case 'driver':
Helper::checkGetParameter('driver_id');
$response = ['list' => $groups->getGroups($_GET['driver_id'])];
echo json_encode($response);
break;
case 'all':
$response = ['list' => $groups->getAllGroups()];
echo json_encode($response);
break;
}
}