Exemple #1
0
function &manPubrepo_CreateTreeView($withContents = TRUE, $multiSelect = FALSE, $withActions = FALSE)
{
    $dirDb = new PubDirDb();
    $treeView = new TreeView($dirDb, 'pubrepo');
    $treeView->parsePositionData($_POST, $_POST, $_POST);
    if ($withContents) {
        $dataRetriever = new PubRepo_DataRetriever(NULL, $GLOBALS['prefix_lms']);
        $TableRenderer = new Table(20);
        $listView = new PubRepo_ListView(_LVTITLEPUBREPO, $dataRetriever, $TableRenderer, 'pubrepo');
        $listView->multiSelect = $multiSelect;
        $listView->parsePositionData($_POST);
        $dataRetriever->setFolder($treeView->selectedFolder);
        $dataRetriever->setOpShowId($listView->_getOpShowItemId());
        $dataRetriever->setOpPlayId($listView->_getOpPlayItemId());
        $dataRetriever->setOpSelectId($listView->_getOpSelectItemId());
        $dataRetriever->setOpDeselectId($listView->_getOpDeselectItemId());
        $dataRetriever->setSelectedObject($listView->getIdSelectedItem());
        $listView->addurl = $treeView->_getOpNewFolderId();
        if ($withActions) {
            //if(funAccess("insitem","NEW", TRUE, "pubrepo")) {
            $listView->setInsNew(TRUE);
            //}
        }
        $treeView->setlistView($listView);
    }
    return $treeView;
}