function moveObjectFolderDown()
 {
     $objectFolderId = $_REQUEST["childObjectFolderIdHidden"];
     assert($objectFolderId != null);
     $folderService = new FolderService();
     $folderService->moveObjectFolderDown($objectFolderId);
     $this->showView();
 }
 /**
  * Updates a new folder
  */
 function updateFolder()
 {
     $controllerData =& $this->collectControlerData();
     $folderId = $controllerData["folderIdHidden"];
     $title = $controllerData["titleText"];
     $parentId = $controllerData["parentIdHidden"];
     $position = $controllerData["positionText"];
     $shortDescription = $controllerData["shortDescriptionText"];
     $longDescription = $controllerData["longDescriptionTextarea"];
     $classesIdArray = $controllerData["classesIdSelect"];
     if ($title == null || $title == "") {
         $this->addErrorMessage("title");
     }
     if ($shortDescription == null || $shortDescription == "") {
         $this->addErrorMessage("shortdescription");
     }
     if ($longDescription == null || $longDescription == "") {
         $this->addErrorMessage("longdescription");
     }
     if (count($classesIdArray) <= 0) {
         $this->addErrorMessage("classes");
     }
     if (count($this->controllerMessageArray) > 0) {
         $this->displayUpdateFolderView("addFolder.tpl.php");
         return;
     }
     $folder = new Folder();
     $folder->setId($folderId);
     $folder->setTitle($title);
     $folder->setParentId($parentId);
     $folder->setPosition($position);
     $folder->setShortDescription($shortDescription);
     $folder->setLongDescription($longDescription);
     $folderClassesArray = array();
     foreach ($classesIdArray as $classId) {
         $folderClass = new FolderClass();
         $folderClass->setClassID($classId);
         $folderClass->setPosition(1);
         $folderClass->setIsDefault(0);
         array_push($folderClassesArray, $folderClass);
     }
     $folder->setFolderClasses($folderClassesArray);
     $folderService = new FolderService();
     $folderService->update($folder);
     $this->redirectToReferer();
 }