本文整理汇总了PHP中CProject::loadAll方法的典型用法代码示例。如果您正苦于以下问题:PHP CProject::loadAll方法的具体用法?PHP CProject::loadAll怎么用?PHP CProject::loadAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CProject
的用法示例。
在下文中一共展示了CProject::loadAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: void
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('Projects', 'icon.png', $m);
//$titleBlock->addSearchCell($search_string);
$titleBlock->addFilterCell('Type', 'project_type', $project_types, $project_type);
$titleBlock->addFilterCell('Company', 'project_company', $allowedCompanies, $company_id);
$titleBlock->addFilterCell('Owner', 'project_owner', $user_list, $owner);
if ($canCreate) {
$titleBlock->addButton('new project', '?m=projects&a=addedit');
}
$titleBlock->addCell('<span title="' . $AppUI->_('Projects') . '::' . $AppUI->_('Print projects list') . '.">' . '<a href="javascript: void(0);" onclick ="window.open(\'index.php?m=projects&a=printprojects&dialog=1&suppressHeaders=1&company_id=' . $company_id . '&project_type=' . $project_type . '&project_owner=' . $owner . '\', \'printprojects\',\'width=1200, height=600, menubar=1, scrollbars=1\')">
<img src="' . w2PfindImage('printer.png') . '" />
</a></span>');
$titleBlock->show();
$project_statuses = array();
$project_statuses = w2PgetSysVal('ProjectStatus');
$project_statuses[-2] = 'All Projects';
$project_statuses[-1] = 'All Active';
$project_statuses[] = 'Archived';
ksort($project_statuses);
$counts = $project->getProjectsByStatus($company_id);
$counts[-2] = count($project->loadAll(null, $company_id > 0 ? 'project_company = ' . $company_id : ''));
$counts[-1] = count($project->loadAll(null, 'project_active = 1' . ($company_id > 0 ? ' AND project_company = ' . $company_id : '')));
$counts[count($project_statuses) - 3] = $counts[-2] - $counts[-1];
$tabBox = new CTabBox('?m=projects', W2P_BASE_DIR . '/modules/projects/', $tab);
foreach ($project_statuses as $key => $project_status) {
$tabname = $project_status . '(' . (int) $counts[$key] . ')';
$tabBox->add('vw_idx_projects', mb_trim($tabname), true);
}
$min_view = true;
$tabBox->add('viewgantt', 'Gantt');
$tabBox->show();