本文整理汇总了PHP中Staff::getAvailableStaffMembers方法的典型用法代码示例。如果您正苦于以下问题:PHP Staff::getAvailableStaffMembers方法的具体用法?PHP Staff::getAvailableStaffMembers怎么用?PHP Staff::getAvailableStaffMembers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Staff
的用法示例。
在下文中一共展示了Staff::getAvailableStaffMembers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Members
}
?>
</table>
</div>
<div class="tab_content" id="contact-settings" style="display:none;margin:5px;">
<table style="width:100%">
<tbody>
<tr>
<td width="180">
Account Manager:
</td>
<td>
<select name="manager">
<option value="0" selected="selected">— None —</option><?php
if ($users = Staff::getAvailableStaffMembers()) {
?>
<optgroup label="Staff Members (<?php
echo count($users);
?>
)">
<?php
foreach ($users as $id => $name) {
$k = "s{$id}";
echo sprintf('<option value="%s" %s>%s</option>', $k, $info['manager'] == $k ? 'selected="selected"' : '', $name);
}
echo '</optgroup>';
}
if ($teams = Team::getActiveTeams()) {
?>
<optgroup label="Teams (<?php
示例2: listStaffJsonAction
public function listStaffJsonAction()
{
$staff = array();
$items = \Staff::getAvailableStaffMembers();
foreach ($items as $id => $name) {
if (isset($id) && isset($name)) {
$entry = array();
$entry['name'] = $name;
$entry['staff_id'] = $id;
$staff[] = $entry;
}
}
return json_encode($staff);
}