Beispiel #1
0
 function viewFolderKu()
 {
     $time_start = microtime(true);
     $parentGuid = $this->_node;
     $columns = 4;
     $tblFolder = new Pandamp_Modules_Misc_Menu_Model_Menu();
     $rowsetFolder = $tblFolder->fetchChildren($parentGuid);
     $num_rows = count($rowsetFolder);
     $rows = ceil($num_rows / $columns);
     if ($num_rows < $columns) {
         $columns = $num_rows;
     }
     if ($num_rows == 0) {
     }
     $in = 0;
     $data = array();
     foreach ($rowsetFolder as $rowFolder) {
         $data[$in][0] = $rowFolder->title;
         $data[$in][1] = $rowFolder->description;
         $data[$in][2] = $rowFolder->guid;
         $data[$in][3] = '';
         $in++;
     }
     $this->view->rows = $rows;
     $this->view->columns = $columns;
     $this->view->data = $data;
     $this->view->numberOfFolders = $num_rows;
     $this->view->node = $parentGuid;
     if ($parentGuid != 'root') {
         $rowCurrentNode = $tblFolder->find($parentGuid)->current();
         $this->view->currentNodeTitle = $rowCurrentNode->title;
     } else {
         $this->view->currentNodeTitle = 'ROOT';
     }
     $time_end = microtime(true);
     $time = $time_end - $time_start;
 }