public function showMoveIntoObjectTreeObject()
 {
     global $ilTabs, $ilToolbar;
     $ilTabs->setTabActive('view_content');
     if (!in_array($_SESSION['clipboard']['cmd'], array('cut'))) {
         $message = __METHOD__ . ": cmd was not 'cut'; may be a hack attempt!";
         $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
     }
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.paste_into_multiple_objects.html', "Services/Object");
     require_once './Services/Object/classes/class.ilPasteIntoMultipleItemsExplorer.php';
     $exp = new ilPasteIntoMultipleItemsExplorer(ilPasteIntoMultipleItemsExplorer::SEL_TYPE_RADIO, 'ilias.php?baseClass=ilRepositoryGUI&cmd=goto', 'paste_cut_repexpand');
     $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showMoveIntoObjectTree'));
     $exp->setTargetGet('ref_id');
     $exp->setPostVar('node');
     $exp->setCheckedItems(array((int) $_POST['node']));
     $exp->highlightNode($_GET['ref_id']);
     if ($_GET['paste_cut_repexpand'] == '') {
         $expanded = $this->tree->readRootId();
     } else {
         $expanded = $_GET['paste_cut_repexpand'];
     }
     $this->tpl->setVariable('FORM_TARGET', '_top');
     $this->tpl->setVariable('FORM_ACTION', $this->ctrl->getFormAction($this, 'performPasteIntoMultipleObjects'));
     $exp->setExpand($expanded);
     // build html-output
     $exp->setOutput(0);
     $output = $exp->getOutput();
     $this->tpl->setVariable('OBJECT_TREE', $output);
     $this->tpl->setVariable('CMD_SUBMIT', 'performPasteIntoMultipleObjects');
     $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('paste'));
     $ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'cancelMoveLink'));
 }
 /**
  * Move node: select target (via explorer)
  */
 function showMoveIntoObjectTree()
 {
     global $ilTabs, $tree;
     $ilTabs->clearTargets();
     if (!$_SESSION['clipboard']['shared']) {
         $ilTabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this));
     } else {
         $ilTabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'share'));
     }
     $mode = $_SESSION['clipboard']['cmd'];
     ilUtil::sendInfo($this->lng->txt('msg_' . $mode . '_clipboard'));
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.paste_into_multiple_objects.html', "Services/Object");
     // move/copy in personal workspace
     if (!$_SESSION['clipboard']['wsp2repo']) {
         require_once 'Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php';
         $exp = new ilWorkspaceExplorer(ilWorkspaceExplorer::SEL_TYPE_RADIO, '', 'paste_' . $mode . '_wspexpand', $this->tree, $this->getAccessHandler());
         $exp->setTargetGet('wsp_id');
         if ($_GET['paste_' . $mode . '_wspexpand'] == '') {
             // not really used as session is already set [see above]
             $expanded = $this->tree->readRootId();
         } else {
             $expanded = $_GET['paste_' . $mode . '_wspexpand'];
         }
     } else {
         require_once './Services/Object/classes/class.ilPasteIntoMultipleItemsExplorer.php';
         $exp = new ilPasteIntoMultipleItemsExplorer(ilPasteIntoMultipleItemsExplorer::SEL_TYPE_RADIO, '', 'paste_' . $mode . '_repexpand');
         $exp->setTargetGet('ref_id');
         if ($_GET['paste_' . $mode . '_repexpand'] == '') {
             $expanded = $tree->readRootId();
         } else {
             $expanded = $_GET['paste_' . $mode . '_repexpand'];
         }
     }
     $exp->setCheckedItems(array((int) $_POST['node']));
     $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showMoveIntoObjectTree'));
     $exp->setPostVar('node');
     $exp->setExpand($expanded);
     $exp->setOutput(0);
     $this->tpl->setVariable('OBJECT_TREE', $exp->getOutput());
     unset($exp);
     $this->tpl->setVariable('FORM_TARGET', '_top');
     $this->tpl->setVariable('FORM_ACTION', $this->ctrl->getFormAction($this, 'performPasteIntoMultipleObjects'));
     $this->tpl->setVariable('CMD_SUBMIT', 'performPasteIntoMultipleObjects');
     $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('paste'));
 }
 /**
  * Show target selection
  * @return 
  */
 public function showSourceSelectionTree()
 {
     global $ilTabs, $ilToolbar, $ilCtrl, $tree, $tpl, $objDefinition;
     $this->tpl = $tpl;
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.paste_into_multiple_objects.html', "Services/Object");
     ilUtil::sendInfo($this->lng->txt('msg_copy_clipboard_source'));
     include_once './Services/Object/classes/class.ilPasteIntoMultipleItemsExplorer.php';
     $exp = new ilPasteIntoMultipleItemsExplorer(ilPasteIntoMultipleItemsExplorer::SEL_TYPE_RADIO, 'ilias.php?baseClass=ilRepositoryGUI&cmd=goto', 'paste_copy_repexpand');
     $ilCtrl->setParameter($this, 'selectMode', self::SOURCE_SELECTION);
     $exp->setExpandTarget($ilCtrl->getLinkTarget($this, 'showSourceSelectionTree'));
     $exp->setTargetGet('ref_id');
     $exp->setPostVar('source');
     $exp->setCheckedItems(array($this->getSource()));
     #$exp->setNotSelectableItems(array($this->getTarget()));
     // Filter to container
     foreach (array('cat', 'root', 'grp', 'fold') as $container) {
         $exp->removeFormItemForType($container);
     }
     if ($_GET['paste_copy_repexpand'] == '') {
         $expanded = $tree->readRootId();
     } else {
         $expanded = $_GET['paste_copy_repexpand'];
     }
     $this->tpl->setVariable('FORM_TARGET', '_self');
     $this->tpl->setVariable('FORM_ACTION', $ilCtrl->getFormAction($this, 'copySelection'));
     $exp->setExpand($expanded);
     // build html-output
     $exp->setOutput(0);
     $output = $exp->getOutput();
     $this->tpl->setVariable('OBJECT_TREE', $output);
     $this->tpl->setVariable('CMD_SUBMIT', 'saveSource');
     $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('btn_next'));
     $ilToolbar->addButton($this->lng->txt('cancel'), $ilCtrl->getLinkTarget($this, 'cancel'));
 }