本文整理汇总了PHP中Dept::getDepartments方法的典型用法代码示例。如果您正苦于以下问题:PHP Dept::getDepartments方法的具体用法?PHP Dept::getDepartments怎么用?PHP Dept::getDepartments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dept
的用法示例。
在下文中一共展示了Dept::getDepartments方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __
<option value="">— <?php echo __('Any Status');?> —</option>
<?php
foreach (TicketStatusList::getStatuses(
array('states' => array('open', 'closed'))) as $s) {
echo sprintf('<option data-state="%s" value="%d">%s</option>',
$s->getState(), $s->getId(), __($s->getName()));
}
?>
</select>
</fieldset>
<fieldset class="span6">
<label for="deptId"><?php echo __('Departments');?>:</label>
<select id="deptId" name="deptId">
<option value="">— <?php echo __('All Departments');?> —</option>
<?php
if(($mydepts = $thisstaff->getDepts()) && ($depts=Dept::getDepartments())) {
foreach($depts as $id =>$name) {
if(!in_array($id, $mydepts)) continue;
echo sprintf('<option value="%d">%s</option>', $id, $name);
}
}
?>
</select>
</fieldset>
<fieldset class="span6">
<label for="flag"><?php echo __('Flags');?>:</label>
<select id="flag" name="flag">
<option value="">— <?php echo __('Any Flags');?> —</option>
<?php
if (!$cfg->showAnsweredTickets()) { ?>
<option data-state="open" value="answered"><?php echo __('Answered');?></option>
示例2: __
echo __('Department');
?>
:</strong></label>
</td>
<td>
<?php
echo sprintf('<span class="faded">' . __('Ticket is currently in <b>%s</b> department.') . '</span>', $ticket->getDeptName());
?>
<br>
<select id="deptId" name="deptId">
<option value="0" selected="selected">— <?php
echo __('Select Target Department');
?>
—</option>
<?php
if ($depts = Dept::getDepartments()) {
foreach ($depts as $id => $name) {
if ($id == $ticket->getDeptId()) {
continue;
}
echo sprintf('<option value="%d" %s>%s</option>', $id, $info['deptId'] == $id ? 'selected="selected"' : '', $name);
}
}
?>
</select> <span class='error'>* <?php
echo $errors['deptId'];
?>
</span>
</td>
</tr>
<tr>
示例3: getManagedDepartments
function getManagedDepartments()
{
return ($depts = Dept::getDepartments(array('manager' => $this->getId()))) ? array_keys($depts) : array();
}