/** * Carries out the specified action */ function render() { // prepare a few parameters $categories = new ArticleCategories(); $blogSettings = $this->_blogInfo->getSettings(); $categoriesOrder = $blogSettings->getValue("categories_order"); // get the page too $this->_page = $this->getCurrentPageFromRequest(); // retrieve the categories in an paged fashion $totalCategories = $categories->getBlogNumCategories($this->_blogInfo->getId(), true); $blogCategories = $categories->getBlogCategoriesAdmin($this->_blogInfo->getId(), false, $categoriesOrder, $this->_page, DEFAULT_ITEMS_PER_PAGE); if (!$blogCategories) { $blogCategories = array(); } // throw the even in case somebody's waiting for it! $this->notifyEvent(EVENT_CATEGORIES_LOADED, array("categories" => &$blogCategories)); $this->setValue("categories", $blogCategories); // the pager that will be used $pager = new Pager("?op=editArticleCategories&page=", $this->_page, $totalCategories, DEFAULT_ITEMS_PER_PAGE); $this->setValue("pager", $pager); parent::render(); }