/**
  * Renders the list of favorites created by the current user
  *
  * @return string
  * @autoTestable
  * @permissions right1
  */
 protected function actionListFavorites()
 {
     $objArraySectionIterator = new class_array_section_iterator(class_module_tags_favorite::getNumberOfFavoritesForUser($this->objSession->getUserID()));
     $objArraySectionIterator->setPageNumber((int) ($this->getParam("pv") != "" ? $this->getParam("pv") : 1));
     $objArraySectionIterator->setArraySection(class_module_tags_favorite::getAllFavoritesForUser($this->objSession->getUserID(), $objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));
     return $this->renderList($objArraySectionIterator);
 }
 /**
  * Generates the list of favorite tags for the current user.
  * Returned structure is json based.
  *
  * @return string
  * @permissions view
  */
 protected function actionGetFavoriteTags()
 {
     class_session::getInstance()->sessionClose();
     class_carrier::getInstance()->getObjSession()->setBitBlockDbUpdate(true);
     class_module_system_changelog::$bitChangelogEnabled = false;
     $arrReturn = array();
     $arrFavorites = class_module_tags_favorite::getAllFavoritesForUser(class_carrier::getInstance()->getObjSession()->getUserID(), 0, 10);
     foreach ($arrFavorites as $objOneFavorite) {
         $arrReturn[] = array("name" => $objOneFavorite->getStrDisplayName(), "onclick" => "location.href='" . getLinkAdminHref("tags", "showAssignedRecords", "&systemid=" . $objOneFavorite->getMappedTagSystemid(), false) . "'", "url" => getLinkAdminHref("tags", "showAssignedRecords", "&systemid=" . $objOneFavorite->getMappedTagSystemid(), false));
     }
     class_response_object::getInstance()->setStrResponseType(class_http_responsetypes::STR_TYPE_JSON);
     return json_encode($arrReturn);
 }