本文整理汇总了PHP中GroupManager::createGroupWithLeaderBLID方法的典型用法代码示例。如果您正苦于以下问题:PHP GroupManager::createGroupWithLeaderBLID方法的具体用法?PHP GroupManager::createGroupWithLeaderBLID怎么用?PHP GroupManager::createGroupWithLeaderBLID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GroupManager
的用法示例。
在下文中一共展示了GroupManager::createGroupWithLeaderBLID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createDefaultGroups
public static function createDefaultGroups()
{
GroupManager::createGroupWithLeaderBLID("Administrator", "", "EB2B36", "crown_gold", 9789);
GroupManager::createGroupWithLeaderBLID("Moderator", "", "336699", "crown_silver", 9789);
GroupManager::createGroupWithLeaderBLID("Reviewer", "", "00ff00", "star", 9789);
}
示例2: dirname
<?php
require_once dirname(__DIR__) . '/private/class/GroupManager.php';
$group = GroupManager::getFromName("Beta");
if ($group === false) {
GroupManager::createGroupWithLeaderBLID("Beta", "Closed beta", "ff0000", "gear", 9789);
$group = GroupManager::getFromName("Beta");
}
if (isset($_POST['action'])) {
if ($_POST['action'] == "add") {
$res = GroupManager::addBLIDToGroupID($_POST['blid'], $group->getId());
if ($res) {
echo "Added " . $_POST['blid'] . "<hr />";
} else {
echo "Failed to add " . $_POST['blid'] . "<hr />";
}
}
}
$members = GroupManager::getMembersByID($group->getId());
foreach ($members as $mem) {
echo $mem . "<br />";
}
?>
<hr />
<form action="" method="post">
<input type="hidden" name="action" value="add" />
<input type="text" name="blid" />
<input type="submit" value="Add" />
</form>