本文整理汇总了PHP中UserDao::countActiveAndRestrictedUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDao::countActiveAndRestrictedUsers方法的具体用法?PHP UserDao::countActiveAndRestrictedUsers怎么用?PHP UserDao::countActiveAndRestrictedUsers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserDao
的用法示例。
在下文中一共展示了UserDao::countActiveAndRestrictedUsers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayStandardHomepage
public function displayStandardHomepage($display_homepage_news)
{
$dao = new Admin_Homepage_Dao();
$current_user = UserManager::instance()->getCurrentUser();
$project_dao = new UserDao();
$nb_users = $project_dao->countActiveAndRestrictedUsers();
$project_dao = new ProjectDao();
$nb_projects = $project_dao->countActiveProjects();
$most_secure_url = '';
if (ForgeConfig::get('sys_https_host')) {
$most_secure_url = 'https://' . ForgeConfig::get('sys_https_host');
}
$login_presenter_builder = new User_LoginPresenterBuilder();
$login_presenter = $login_presenter_builder->buildForHomepage();
$headline = $dao->getHeadlineByLanguage($current_user->getLocale());
$news_bytes_dao = new NewsBytesDao();
$news = false;
if ($display_homepage_news && $news_bytes_dao->isThereNewsToDisplayInHomepage()) {
$news = news_show_latest($GLOBALS['sys_news_group'], 2, true, false, true, 0);
}
$awesomeness = file_get_contents($GLOBALS['Language']->getContent('homepage/awesomeness', null, null, '.html'));
$templates_dir = ForgeConfig::get('codendi_dir') . '/src/templates/homepage/';
$renderer = TemplateRendererFactory::build()->getRenderer($templates_dir);
$presenter = new FlamingParrot_HomepagePresenter($headline, $nb_projects, $nb_users, $most_secure_url, $login_presenter, $display_homepage_news, $news, $current_user, $awesomeness);
$renderer->renderToPage('homepage', $presenter);
}