當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserGroup::getUsers方法代碼示例

本文整理匯總了PHP中UserGroup::getUsers方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserGroup::getUsers方法的具體用法?PHP UserGroup::getUsers怎麽用?PHP UserGroup::getUsers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UserGroup的用法示例。


在下文中一共展示了UserGroup::getUsers方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setGroup

 /**
  * Assign the user to a group
  *
  * @param	Entity\UserGroup	$group
  * @return	void
  */
 public function setGroup(UserGroup $group)
 {
     $this->group = $group;
     // The association must be defined in both directions
     if (!$group->getUsers()->contains($this)) {
         $group->addUser($this);
     }
 }
開發者ID:riteshsingh1,項目名稱:cidoctrine,代碼行數:14,代碼來源:User.php

示例2: UserGroup

<?php

if (isset($_GET['userGroupID'])) {
    $userGroupID = $_GET['userGroupID'];
} else {
    $userGroupID = '';
}
$userGroup = new UserGroup(new NamedArguments(array('primaryKey' => $userGroupID)));
//get all users for output in drop down
$allUserArray = array();
$userObj = new User();
$allUserArray = $userObj->allAsArray();
//get users already set up for this user group in case it's an edit
$ugUserArray = $userGroup->getUsers();
?>
		<div id='div_userGroupForm'>
		<form id='userGroupForm'>
		<input type='hidden' name='editUserGroupID' id='editUserGroupID' value='<?php 
echo $userGroupID;
?>
'>

		<div class='formTitle' style='width:280px; margin-bottom:5px;position:relative;'><span class='headerText'><?php 
if ($userGroupID) {
    echo _("Edit User Group");
} else {
    echo _("Add User Group");
}
?>
</span></div>
開發者ID:billdueber,項目名稱:resources,代碼行數:30,代碼來源:getAdminUserGroupForm.php

示例3: foreach

</th>
				<th><?php 
    echo _("Users");
    ?>
</th>
				<th>&nbsp;</th>
				<th>&nbsp;</th>
				</tr>
				<?php 
    foreach ($userGroupArray as $ug) {
        $userGroup = new UserGroup(new NamedArguments(array('primaryKey' => $ug['userGroupID'])));
        echo "<tr>";
        echo "<td>" . $userGroup->groupName . "</td>";
        echo "<td>" . $userGroup->emailAddress . "</td>";
        echo "<td>";
        foreach ($userGroup->getUsers() as $groupUser) {
            echo $groupUser->getDisplayName . "<br />";
        }
        echo "</td>";
        echo "<td><a href='ajax_forms.php?action=getAdminUserGroupForm&userGroupID=" . $userGroup->userGroupID . "&height=400&width=305&modal=true' class='thickbox'><img src='images/edit.gif' alt='" . _("edit") . "' title='" . _("edit") . "'></a></td>";
        echo "<td><a href='javascript:deleteWorkflow(\"UserGroup\", " . $userGroup->userGroupID . ");'><img src='images/cross.gif' alt='" . _("remove") . "' title='" . _("remove") . "'></a></td>";
        echo "</tr>";
    }
    ?>
			</table>
			<?php 
} else {
    echo _("(none found)") . "<br />";
}
echo "<a href='ajax_forms.php?action=getAdminUserGroupForm&userGroupID=&height=400&width=305&modal=true' class='thickbox'>" . _("add user group") . "</a>";
?>
開發者ID:billdueber,項目名稱:resources,代碼行數:31,代碼來源:getAdminWorkflowDisplay.php


注:本文中的UserGroup::getUsers方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。