/** * Forwards Text Item Selection to GUI classes */ function insertPCText() { global $ilCtrl, $ilSetting; switch ($_POST['pctext_type']) { case '0': //Paragraph / Text // js editing? -> redirect to js page editor // if ($ilSetting->get("enable_js_edit", 1) && ilPageEditorGUI::_doJSEditing()) if (ilPageEditorGUI::_doJSEditing()) { $ret_class = $ilCtrl->getReturnClass($this); $ilCtrl->setParameterByClass($ret_class, "pl_hier_id", $this->hier_id); $ilCtrl->setParameterByClass($ret_class, "pl_pc_id", $this->pc_id); $ilCtrl->redirectByClass($ret_class, "insertJSAtPlaceholder"); } include_once "./Services/COPage/classes/class.ilPCParagraphGUI.php"; $ilCtrl->setCmdClass("ilpcparagraphgui"); $ilCtrl->setCmd("insert"); $paragraph_gui = new ilPCParagraphGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id); $paragraph_gui->setStyleId($this->getStyleId()); $paragraph_gui->setEnableInternalLinks($this->getEnableInternalLinks()); $paragraph_gui->setEnableKeywords($this->getEnableKeywords()); $paragraph_gui->setEnableAnchors($this->getEnableAnchors()); $ret = $ilCtrl->forwardCommand($paragraph_gui); break; case '1': //DataTable include_once "./Services/COPage/classes/class.ilPCDataTableGUI.php"; $ilCtrl->setCmdClass("ilpcdatatablegui"); $ilCtrl->setCmd("insert"); $dtable_gui = new ilPCDataTableGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id); $ret = $ilCtrl->forwardCommand($dtable_gui); break; case '2': //Advanced Table include_once "./Services/COPage/classes/class.ilPCTableGUI.php"; $ilCtrl->setCmdClass("ilpctablegui"); $ilCtrl->setCmd("insert"); $atable_gui = new ilPCTableGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id); $ret = $ilCtrl->forwardCommand($atable_gui); break; case '3': //Advanced List include_once "./Services/COPage/classes/class.ilPCListGUI.php"; $ilCtrl->setCmdClass("ilpclistgui"); $ilCtrl->setCmd("insert"); $list_gui = new ilPCListGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id); $ret = $ilCtrl->forwardCommand($list_gui); break; case '4': //File List include_once "./Services/COPage/classes/class.ilPCFileListGUI.php"; $ilCtrl->setCmdClass("ilpcfilelistgui"); $ilCtrl->setCmd("insert"); $file_list_gui = new ilPCFileListGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id); $file_list_gui->setStyleId($this->getStyleId()); $ret = $this->ctrl->forwardCommand($file_list_gui); break; case '5': //Tabs include_once "./Services/COPage/classes/class.ilPCTabsGUI.php"; $ilCtrl->setCmdClass("ilpctabsgui"); $ilCtrl->setCmd("insert"); $tabs_gui = new ilPCTabsGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id); $tabs_gui->setStyleId($this->getStyleId()); $ret = $this->ctrl->forwardCommand($tabs_gui); break; default: break; } }