本文整理汇总了PHP中Projects::getActiveProjects方法的典型用法代码示例。如果您正苦于以下问题:PHP Projects::getActiveProjects方法的具体用法?PHP Projects::getActiveProjects怎么用?PHP Projects::getActiveProjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Projects
的用法示例。
在下文中一共展示了Projects::getActiveProjects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view_client
/**
* View specific company
*
* @param void
* @return null
*/
function view_client()
{
$this->setTemplate('view_company');
if (!logged_user()->isAdministrator(owner_company())) {
flash_error(lang('no access permissions'));
$this->redirectTo('dashboard');
}
// if
$company = Companies::findById(get_id());
if (!$company instanceof Company) {
flash_error(lang('company dnx'));
$this->redirectTo('administration');
}
// if
tpl_assign('company', $company);
tpl_assign('active_projects', Projects::getActiveProjects(Projects::ORDER_BY_NAME));
tpl_assign('finished_projects', Projects::getFinishedProjects(Projects::ORDER_BY_NAME));
$this->setSidebar(get_template_path('view_client_sidebar', 'company'));
}
示例2: select_company
?>
<?php
echo select_company('user[company_id]', array_var($user_data, 'company_id'), $attributes, false);
?>
</div>
<div class="formBlock">
<?php
echo label_tag(lang('personal project'), $genid . 'userPersonalProject', true);
?>
<div class="desc"><?php
echo lang('personal project desc');
?>
</div>
<?php
echo select_project2('user[personal_project_id]', $user->getPersonalProjectId(), $genid, false, null, Projects::getActiveProjects());
?>
</div>
<!-- user type -->
<div class="formBlock">
<?php
echo label_tag(lang('user type'), null, true);
?>
<?php
echo simple_select_box('user[type]', array(array('admin', lang('admin user')), array('normal', lang('normal user')), array('guest', lang('guest user'))), array_var($user_data, 'type', 'normal'));
?>
</div>
<input type="hidden" name="user[auto_assign]" value="0" />