当前位置: 首页>>代码示例>>PHP>>正文


PHP Group::getAllGroups方法代码示例

本文整理汇总了PHP中Group::getAllGroups方法的典型用法代码示例。如果您正苦于以下问题:PHP Group::getAllGroups方法的具体用法?PHP Group::getAllGroups怎么用?PHP Group::getAllGroups使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Group的用法示例。


在下文中一共展示了Group::getAllGroups方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: validate

 /**
  * @see OptionType::validate()
  */
 public function validate($optionData, $newValue)
 {
     // get all groups
     $groups = Group::getAllGroups();
     // get new value
     if (!is_array($newValue)) {
         $newValue = array();
     }
     $selectedGroups = ArrayUtil::toIntegerArray($newValue);
     // check groups
     foreach ($selectedGroups as $groupID) {
         if (!isset($groups[$groupID])) {
             throw new UserInputException($optionData['optionName'], 'validationFailed');
         }
     }
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:19,代码来源:GroupOptionTypeGroups.class.php

示例2: getFormElement

 /**
  * @see OptionType::getFormElement()
  */
 public function getFormElement(&$optionData)
 {
     $optionData['divClass'] = 'select';
     if (!isset($optionData['optionValue'])) {
         if (isset($optionData['defaultValue'])) {
             $optionData['optionValue'] = $optionData['defaultValue'];
         } else {
             $optionData['optionValue'] = false;
         }
     }
     $options = array();
     $groups = Group::getAllGroups();
     foreach ($groups as $groupID => $group) {
         $options[$groupID] = StringUtil::encodeHTML($group);
     }
     WCF::getTPL()->assign(array('optionData' => $optionData, 'options' => $options));
     return WCF::getTPL()->fetch('optionTypeSelect');
 }
开发者ID:Maggan22,项目名称:wbb3addons,代码行数:21,代码来源:OptionTypeGroupsingleselect.class.php

示例3: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->readClosedCategories();
     $this->groups = Group::getAllGroups();
     $this->readBoardPermissions();
     $this->loadGlobalPermissions();
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:11,代码来源:GroupPermissionsEditForm.class.php

示例4: Group

		<input type="radio" name="bestOfOption" value="0" checked>Gruppe
		<input type="radio" name="bestOfOption" value="1">KO-Runde
	</td></tr>
	<tr><td colspan="2"><input type="hidden" name="newGroup" value="1"><input type="submit" /></td></tr>
</table>
</form>



<?php 
if (!isset($group)) {
    include 'class_group.php';
    $group = new Group();
}
echo "Gruppen <br />";
$data = $group->getAllGroups();
echo "<table>";
echo "<tr><th>key</th><th>_Id</th><th>name</th><th>link</th><th>logoPath</th><th>qualifiers</th><th>teamCount</th><th>replays</th><th>state</th><th>bestOfOption</th><th>begin</th><th>end</th><th></th></tr>";
foreach ($data as $key => $value) {
    echo "<form id='login", $value['_Id'], "' method='post' action='group.php'>";
    echo "<tr><td>", $key, " =>  </td><td>", $value['_Id'], "</td><td>", $value['name'], "</td><td>", $value['link'], "</td><td>", $value['logoPath'], "</td><td>", $value['qualifiers'], "</td><td>", $value['teamCount'], "</td><td>", $value['replays'], "</td><td>", $value['state'], "</td><td>", $value['bestOfOption'], "</td><td>", $value['begin'], "</td><td>", $value['end'], "</td>";
    echo "<td><input type='hidden' name='tId' value='", $value['_Id'], "' />";
    ?>
		<a href="#" onclick="javascript:document.forms['login<?php 
    echo $value['_Id'];
    ?>
'].submit()">mehr...</a></td></tr>
		<?php 
    echo "</form>";
}
echo "</table>";
开发者ID:fendela,项目名称:ftm,代码行数:31,代码来源:group.php

示例5: getAllUsers

 public static function getAllUsers($ACCESS_TOKEN, $refresh = false, $extPart = '')
 {
     $allusers = Cache::get('all_users');
     if (empty($allusers) || $refresh) {
         $allusers = [];
         $groups = Group::getAllGroups($ACCESS_TOKEN, $refresh);
         $groups = array_values($groups);
         $percent = 0;
         $threads = 6;
         global $key;
         if ($key == 'woldy' && in_array('pthreads', get_loaded_extensions())) {
             $g = [];
             //组织架构分组
             $f = [];
             //函数分组
             $t = [];
             //线程分组
             foreach ($groups as $idx => $group) {
                 if (!empty($extPart)) {
                     //排除的分组
                     if (strrpos($group['fullname'], $extPart)) {
                         continue;
                     }
                 }
                 if (!isset($g[$idx % $threads])) {
                     $g[$idx % $threads] = [];
                 }
                 array_push($g[$idx % $threads], $group);
             }
             for ($i = 0; $i < $threads; $i++) {
                 $f[$i] = function ($p) {
                     $partGroupUsers = [];
                     foreach ($p['g'] as $group) {
                         $users = Group::getGroupUsers($group['id'], $p['atk'], $p['refresh']);
                         foreach ($users as $user) {
                             array_push($partGroupUsers, json_decode(json_encode($user), true));
                         }
                         echo $p['i'] . ',';
                     }
                     return json_encode($partGroupUsers);
                 };
                 $p = ['g' => $g[$i], 'atk' => $ACCESS_TOKEN, 'refresh' => $refresh, 'i' => $i];
                 $t[$i] = new dThreads($f[$i], $p);
                 $t[$i]->start();
             }
             while (count($t) > 0) {
                 for ($i = 0; $i < $threads; $i++) {
                     if (isset($t[$i]) && !$t[$i]->runing) {
                         echo "\n------{$i}-------\n";
                         $res = json_decode($t[$i]->result, true);
                         $allusers = array_merge($allusers, $res);
                         echo '.';
                         //$t[$i]->kill();
                         unset($t[$i]);
                     }
                 }
             }
         } else {
             foreach ($groups as $idx => $group) {
                 if (intval($idx * 100 / count($groups)) > $percent) {
                     $percent = intval($idx * 100 / count($groups));
                     echo '.';
                     if ($percent % 33 == 0) {
                         echo "\n";
                     }
                 }
                 if (!empty($extPart)) {
                     if (strrpos($group['fullname'], $extPart)) {
                         continue;
                     }
                 }
                 $users = Group::getGroupUsers($group['id'], $ACCESS_TOKEN, $refresh);
                 foreach ($users as $user) {
                     array_push($allusers, json_decode(json_encode($user), true));
                 }
             }
         }
         Cache::put('all_users', $allusers, 1160);
     }
     return $allusers;
 }
开发者ID:woldy,项目名称:ddsdk,代码行数:81,代码来源:Contacts.php

示例6: showRecord

 function showRecord()
 {
     global $wgOut;
     $groups =& Group::getAllGroups();
     $rec = serialize($groups);
     // Split it into lines
     $rec = explode("\r\n", chunk_split($rec));
     $s = '';
     foreach ($rec as $index => $line) {
         if (trim($line) != '') {
             if ($s) {
                 $s .= "' .\n\t'";
             }
             // Escape it for PHP
             $line = str_replace(array('\\', "'"), array('\\\\', "\\'"), $line);
             // Escape it for HTML
             $line = htmlspecialchars($line);
             // Add it to the string
             $s .= $line;
         }
     }
     $s .= "';";
     $s = "<p>Copy the following into LocalSettings.php:</p>\n" . "<textarea readonly rows=20>\n" . "\$wgStaticGroups = \n\t'{$s}\n" . "</textarea>";
     $wgOut->addHTML($s);
 }
开发者ID:BackupTheBerlios,项目名称:openzaurus-svn,代码行数:25,代码来源:SpecialGroups.php

示例7: function

$app->put('/groups', function ($request, $response, $args) {
    $put = json_decode($request->getBody());
    // make it a PHP associative array
    $putArray = get_object_vars($put);
    $members = array();
    $tmpMembers = $putArray['users'];
    foreach ($tmpMembers as $tmpmember) {
        $member = get_object_vars($tmpmember);
        $members[] = new User($member['mtklNr'], '', '', '');
    }
    $group = new Group(null, $putArray['name'], $putArray['owner'], $members, $putArray['groupImage']);
    $group->add();
    echo json_encode($group);
});
$app->get('/groups', function ($request, $response, $args) {
    $groups = Group::getAllGroups();
    echo json_encode($groups);
});
$app->get('/groups/{id}', function ($request, $response, $args) {
    $group = Group::getGroupById($args['id']);
    echo json_encode($group);
});
$app->get('/groups/{id}/meetings', function ($request, $response, $args) {
    $meetings = Group::getAllMeetingsOfGroup($args['id']);
    echo json_encode($meetings);
});
$app->post('/groups/{id}', function ($request, $response, $args) {
    $group = Group::getGroupById($args['id']);
    $server_params = $request->getServerParams();
    if (preg_match("/Basic\\s+(.*)\$/i", $server_params["REDIRECT_HTTP_AUTHORIZATION"], $matches)) {
        list($user, $password) = explode(":", base64_decode($matches[1]));
开发者ID:kschaefers,项目名称:RaumsucheRestBackend,代码行数:31,代码来源:index.php

示例8:

<?php

include "../assets/_header_in.php";
include "../assets/_header_groups.php";
?>
<ul>
<?php 
require_once "../classes/group.php";
$all_groups = Group::getAllGroups();
for ($i = 0; $i < count($all_groups); $i++) {
    echo "<li><a href='index.php?id_group=" . $all_groups[$i]["id"] . "'>" . $all_groups[$i]["name"] . "</a></li>";
}
?>
</ul>
<a href="create_group.php">Create group</a>
<?php 
include "../assets/_footer.php";
开发者ID:krapahkrm,项目名称:mycalendar,代码行数:17,代码来源:all_groups.php


注:本文中的Group::getAllGroups方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。