/** * Returns a list of the languages * * @return string * @autoTestable * @permissions view */ protected function actionList() { $objArraySectionIterator = new class_array_section_iterator(class_module_languages_language::getNumberOfLanguagesAvailable()); $objArraySectionIterator->setPageNumber((int) ($this->getParam("pv") != "" ? $this->getParam("pv") : 1)); $objArraySectionIterator->setArraySection(class_module_languages_language::getObjectList(false, $objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos())); return $this->renderList($objArraySectionIterator); }
/** * @param class_model $objListEntry * * @return array */ protected function renderAdditionalActions(class_model $objListEntry) { if ($objListEntry instanceof class_module_news_category) { return array($this->objToolkit->listButton(class_link::getLinkAdmin($this->getArrModule("modul"), "listNewsAndCategories", "&filterId=" . $objListEntry->getSystemid(), "", $this->getLang("kat_anzeigen"), "icon_lens"))); } if ($objListEntry instanceof class_module_news_news && $objListEntry->rightEdit()) { if (class_module_languages_language::getNumberOfLanguagesAvailable() > 1) { return array($this->objToolkit->listButton(class_link::getLinkAdminDialog($this->getArrModule("modul"), "editLanguageset", "&systemid=" . $objListEntry->getSystemid(), "", $this->getLang("news_languageset"), "icon_language"))); } } return array(); }
/** * Helper to determin the number of portal languages only once. * @return int */ private static function getIntNumberOfPortalLanguages() { if (self::$intNrOfPortalLanguages == null) { self::$intNrOfPortalLanguages = class_module_languages_language::getNumberOfLanguagesAvailable(true); } return self::$intNrOfPortalLanguages; }