本文整理匯總了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()) {