本文整理汇总了PHP中XString::arrayKeys方法的典型用法代码示例。如果您正苦于以下问题:PHP XString::arrayKeys方法的具体用法?PHP XString::arrayKeys怎么用?PHP XString::arrayKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XString
的用法示例。
在下文中一共展示了XString::arrayKeys方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkInput
医生名或者医生用户名:<input type="text" name="doctorname" id="doctorname">
<input type="submit" value="搜索" onclick="return checkInput()" style="padding:5px 10px">
</form>
</div>
<div style="padding-top:0px">
<table class="adminlist" style="width:70%;">
<tr style="background-color:#eee;">
<td style="text-align:center;" width="5%"><input id="all_c" type="checkbox">全选</td>
<td style="text-align:center;" width="10%">医生</td>
<td style="text-align:center;" width="30%">医院/科室</td>
<td style="text-align:center;" width="30%">组名</td>
</tr>
<?php
if (false == empty($groups)) {
foreach ($groups as $group) {
$groupIds = XString::arrayKeys($group->regroupmembers, 'patientId');
$groupIds = implode(',', $groupIds);
?>
<tr class="cla">
<td >
<input type="checkbox" name="groupids[]" value="<?php
echo $groupIds;
?>
">
</td>
<td style="text-align:center;"><?php
echo $group->space->host->name;
?>
</td>
<td style="text-align:center;"><?php
echo $group->space->host->hospitalfaculty->hospital->name;
示例2: exportContacts
public function exportContacts($request, $response)
{
/*{{{*/
$pageSize = 20;
$pagelink = '';
$groups = array();
$doctorName = $request->doctorname;
if ($doctorName) {
$spaces = SpaceClient::getInstance()->getSpacesByName($doctorName);
if (false == empty($spaces)) {
$ids = XString::arrayKeys($spaces, 'id');
}
$nowPage = $request->getRequest('p', 1);
if (false == empty($ids)) {
$res = ForumClient::getInstance()->getAllGroupsBySpaceIds($ids, $nowPage, $pageSize);
$groups = $res['list'];
}
$pageInfo = $res['pageInfo'];
if (false == empty($pageInfo)) {
$pagelink = PageNav::getNavLink(PageNav::getPageNavTemplate("/residentevil/exportcontacts?doctorname={$doctorName}&p="), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
}
}
$response->groups = $groups;
$response->pagelink = $pagelink;
}