本文整理匯總了PHP中CProject::storeBudget方法的典型用法代碼示例。如果您正苦於以下問題:PHP CProject::storeBudget方法的具體用法?PHP CProject::storeBudget怎麽用?PHP CProject::storeBudget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CProject
的用法示例。
在下文中一共展示了CProject::storeBudget方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: implode
$obj->project_departments = implode(',', w2PgetParam($_POST, 'dept_ids', array()));
}
$action = $del ? 'deleted' : 'stored';
$result = $del ? $obj->delete() : $obj->store();
$redirect = $del ? 'm=projects' : 'm=projects&a=view&project_id=' . $obj->project_id;
$notify_owner = w2PgetParam($_POST, 'email_project_owner_box', 'off');
$notify_contacts = w2PgetParam($_POST, 'email_project_contacts_box', 'off');
$importTask_projectId = (int) w2PgetParam($_POST, 'import_tasks_from', '0');
if ($result) {
if (!$del) {
$billingCategory = w2PgetSysVal('BudgetCategory');
$budgets = array();
foreach ($billingCategory as $id => $category) {
$budgets[$id] = w2PgetParam($_POST, 'budget_' . $id, 0);
}
$obj->storeBudget($budgets);
if ($importTask_projectId) {
$import_result = $obj->importTasks($importTask_projectId);
if (is_array($import_result) && count($import_result)) {
$AppUI->setMsg($import_result, UI_MSG_ERROR, true);
$AppUI->holdObject($obj);
$AppUI->redirect('m=projects&a=addedit&project_id=' . $obj->project_id);
}
}
if ('on' == $notify_owner) {
$obj->notifyOwner($notfiyTrigger);
}
if ('on' == $notify_contacts) {
$obj->notifyContacts($notfiyTrigger);
}
$redirect = 'm=projects&a=view&project_id=' . $obj->project_id;