本文整理汇总了PHP中Dept::getNameById方法的典型用法代码示例。如果您正苦于以下问题:PHP Dept::getNameById方法的具体用法?PHP Dept::getNameById怎么用?PHP Dept::getNameById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dept
的用法示例。
在下文中一共展示了Dept::getNameById方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDefaultDeptName
function getDefaultDeptName()
{
global $cfg;
return $cfg && $cfg->getDefaultDeptId() && ($name = Dept::getNameById($cfg->getDefaultDeptId())) ? $name : null;
}
示例2: getDefaultDeptName
static function getDefaultDeptName()
{
global $cfg;
return Dept::getNameById($cfg->getDefaultDeptId());
}
示例3: array
$fields = array();
$fields['dept_id'] = array('type' => 'int', 'required' => 1, 'error' => 'Select Department');
$fields['message'] = array('type' => 'text', 'required' => 1, 'error' => 'Note/Message required');
$params = new Validator($fields);
if (!$params->validate($_POST)) {
$errors = array_merge($errors, $params->errors());
}
if (!$errors && $_POST['dept_id'] == $ticket->getDeptId()) {
$errors['dept_id'] = 'Ticket already in the Dept.';
}
if (!$errors && !$thisuser->canTransferTickets()) {
$errors['err'] = 'Action Denied. You are not allowed to transfer tickets.';
}
if (!$errors && $ticket->transfer($_POST['dept_id'])) {
//Send out alerts??
$title = 'Dept. Transfer: ' . $ticket->getDeptName() . ' to ' . Dept::getNameById($_POST['dept_id']);
$ticket->postNote($title, $_POST['message']);
$msg = 'Ticket Transfered Sucessfully';
} else {
$errors['err'] = $errors['err'] ? $errors['err'] : 'Unable to complete the transfer';
}
break;
case 'assign':
$fields = array();
$fields['staffId'] = array('type' => 'int', 'required' => 1, 'error' => 'Select assignee');
$fields['assign_message'] = array('type' => 'text', 'required' => 1, 'error' => 'Message required');
$params = new Validator($fields);
if (!$params->validate($_POST)) {
$errors = array_merge($errors, $params->errors());
}
if (!$errors && $ticket->isAssigned()) {