Esempio n. 1
0
 /**
  * Renders the articles.
  *
  * @return string (X)HTML.
  *
  * @global array               The configuration of the plugins.
  * @global array               The localization of the plugins.
  * @global Realblog_Controller The plugin controller.
  */
 protected function renderArticles()
 {
     global $plugin_cf, $plugin_tx, $_Realblog_controller;
     $articles = Realblog_Article::findArticlesWithStatus($this->getFilterStatuses());
     $page_record_limit = $plugin_cf['realblog']['admin_records_page'];
     $db_total_records = count($articles);
     $pageCount = ceil($db_total_records / $page_record_limit);
     $page = max(min($_Realblog_controller->getPage(), $pageCount), 1);
     $start_index = ($page - 1) * $page_record_limit;
     $view = new Realblog_ArticlesAdminView($articles, $page_record_limit, $start_index, $pageCount);
     return '<h1>Realblog &ndash; ' . $plugin_tx['realblog']['story_overview'] . '</h1>' . $view->render();
 }