当前位置: 首页>>代码示例>>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;未经允许,请勿转载。