本文整理匯總了PHP中InboundEmail::handleIsPersonal方法的典型用法代碼示例。如果您正苦於以下問題:PHP InboundEmail::handleIsPersonal方法的具體用法?PHP InboundEmail::handleIsPersonal怎麽用?PHP InboundEmail::handleIsPersonal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類InboundEmail
的用法示例。
在下文中一共展示了InboundEmail::handleIsPersonal方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$GLOBALS['log']->debug("isDuplicate found - duplicating record of id: " . $focus->id);
$focus->id = "";
}
$GLOBALS['log']->info("InboundEmail Edit View");
/* End standard EditView setup logic */
/* Start custom setup logic */
// status drop down
$status = get_select_options_with_id_separate_key($app_list_strings['user_status_dom'], $app_list_strings['user_status_dom'], $focus->status);
// Groups
$selectGroups = '<option value="new">' . $mod_strings['LBL_CREATE_NEW_GROUP'] . '</option>';
// handle if this I-E is personal or group
$isPersonal = false;
if (!empty($focus->id)) {
$isPersonal = $focus->handleIsPersonal();
}
if ($selects = $focus->getGroupsWithSelectOptions()) {
$selectGroups .= $selects;
}
if ($isPersonal) {
// stomp out standard
$selectGroups = '<option value="' . $focus->group_id . '">' . $focus->getUserNameFromGroupId() . '</option>';
}
// default MAILBOX value
if (empty($focus->mailbox)) {
$mailbox = 'INBOX';
} else {
$mailbox = $focus->mailbox;
}
// service options breakdown
示例2:
} else {
$xtpl->assign('TRASH_SENT_FOLDER_STYLE', "display:''");
}
// else
$possibleAction = "pick";
if (!isset($app_list_strings['dom_mailbox_type'][$focus->mailbox_type])) {
$possibleAction = $app_list_strings['dom_mailbox_type']['pick'];
} else {
$possibleAction = $app_list_strings['dom_mailbox_type'][$focus->mailbox_type];
}
$xtpl->assign('GROUP_NAME', $groupName);
$xtpl->assign('MAILBOX_TYPE', $possibleAction);
$xtpl->assign('EMAIL_TEMPLATE', $emailTemplate);
$xtpl->assign('FROM_NAME', $from_name);
$xtpl->assign('FROM_ADDR', $from_addr);
$xtpl->assign('DEFAULT_FROM_NAME', $default_from_name);
$xtpl->assign('DEFAULT_FROM_ADDR', $default_from_addr);
$xtpl->assign('REPLY_TO_NAME', $reply_to_name);
$xtpl->assign('REPLY_TO_ADDR', $reply_to_addr);
$xtpl->assign('ONLY_SINCE', $onlySince);
$xtpl->assign('FILTER_DOMAIN', $filterDomain);
if (!empty($focus->port)) {
$xtpl->assign('PORT', $focus->port);
}
if ($focus->handleIsPersonal()) {
$xtpl->assign('LBL_GROUP_QUEUE', $mod_strings['LBL_ASSIGN_TO_USER']);
} else {
$xtpl->assign('LBL_GROUP_QUEUE', $mod_strings['LBL_GROUP_QUEUE']);
}
$xtpl->parse('main');
$xtpl->out('main');
示例3: handleIsPersonal
public function handleIsPersonal($id)
{
$inboundEmail = new InboundEmail();
//test with a invalid group_id
$inboundEmail->group_id = 2;
$result = $inboundEmail->handleIsPersonal();
$this->assertEquals(false, $result);
//test with a valid group_id
$inboundEmail->retrieve($id);
$result = $inboundEmail->handleIsPersonal();
$this->assertEquals(true, $result);
}