當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserDao::countActiveAndRestrictedUsers方法代碼示例

本文整理匯總了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);
 }
開發者ID:rinodung,項目名稱:tuleap,代碼行數:26,代碼來源:FlamingParrot_Theme.class.php


注:本文中的UserDao::countActiveAndRestrictedUsers方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。