本文整理匯總了PHP中CProject::getCompany方法的典型用法代碼示例。如果您正苦於以下問題:PHP CProject::getCompany方法的具體用法?PHP CProject::getCompany怎麽用?PHP CProject::getCompany使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CProject
的用法示例。
在下文中一共展示了CProject::getCompany方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: die
<?php
/* $Id$ $URL$ */
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
global $AppUI, $project_id, $df, $canEdit, $m, $tab;
// Lets check which cost codes have been used before
$company_id = CProject::getCompany($project_id);
$task_log_costcodes = array(0 => '(all)') + CProject::getBillingCodes($company_id, true);
$users = w2PgetUsers();
$cost_code = w2PgetParam($_GET, 'cost_code', 0);
if (isset($_GET['user_id'])) {
$AppUI->setState('ProjectsTaskLogsUserFilter', w2PgetParam($_GET, 'user_id', 0));
}
$user_id = $AppUI->getState('ProjectsTaskLogsUserFilter') ? $AppUI->getState('ProjectsTaskLogsUserFilter') : 0;
if (isset($_GET['hide_inactive'])) {
$AppUI->setState('ProjectsTaskLogsHideArchived', true);
} else {
$AppUI->setState('ProjectsTaskLogsHideArchived', false);
}
$hide_inactive = $AppUI->getState('ProjectsTaskLogsHideArchived');
if (isset($_GET['hide_complete'])) {
$AppUI->setState('ProjectsTaskLogsHideComplete', true);
} else {
$AppUI->setState('ProjectsTaskLogsHideComplete', false);
}
$hide_complete = $AppUI->getState('ProjectsTaskLogsHideComplete');
?>
<script language="JavaScript">
<?php
示例2: testGetCompany
/**
* Tests finding company of project
*/
public function testGetCompany()
{
$company = CProject::getCompany(1);
$this->assertEquals(1, $company);
}