/** * Constructor * @access public * @param string $a_target scriptname * @param string $a_session_variable session_variable */ public function __construct($a_type, $a_target, $a_session_variable) { global $tree, $ilCtrl; $this->setId("cont_paste_explorer"); $this->ctrl = $ilCtrl; $this->type = $a_type; parent::__construct($a_target); $this->tree = $tree; $this->root_id = $this->tree->readRootId(); $this->order_column = 'title'; $this->setSessionExpandVariable($a_session_variable); // reset filter $this->filter = array(); $this->addFilter('root'); $this->addFilter('crs'); $this->addFilter('grp'); $this->addFilter('cat'); $this->addFilter('fold'); $this->addFormItemForType('root'); $this->addFormItemForType('crs'); $this->addFormItemForType('grp'); $this->addFormItemForType('cat'); $this->addFormItemForType('fold'); $this->setFiltered(true); $this->setFilterMode(IL_FM_POSITIVE); }
/** * Constructor * @access public * @param string $a_target scriptname * @param string $a_session_variable session_variable * @param ilWorkspaceTree $a_tree workspace tree * @param ilWorkspaceAccessHandler $a_access_handler workspace access handler */ public function __construct($a_type, $a_target, $a_session_variable, ilWorkspaceTree $a_tree, ilWorkspaceAccessHandler $a_access_handler) { global $ilCtrl; $this->ctrl = $ilCtrl; $this->type = $a_type; $this->access = $a_access_handler; parent::__construct($a_target); // #11173 if (!$a_tree->readRootId()) { // create (workspace) root folder $root = ilObjectFactory::getClassByType("wsrt"); $root = new $root(null); $root->create(); $root_id = $a_tree->createReference($root->getId()); $a_tree->addTree($a_tree->getTreeId(), $root_id); $a_tree->setRootId($root_id); } $this->tree = $a_tree; $this->root_id = $this->tree->readRootId(); $this->order_column = 'title'; $this->setSessionExpandVariable($a_session_variable); // reset filter $this->filter = array(); $this->addFilter('wsrt'); $this->addFilter('wfld'); $this->addFormItemForType('wsrt'); $this->addFormItemForType('wfld'); $this->setFiltered(true); $this->setFilterMode(IL_FM_POSITIVE); }