3 require_once(
'class.ilCachedCtrl.php');
112 $this->stored_trees = array(
"ilrepositorygui",
"ildashboardgui",
113 "illmpresentationgui",
"illmeditorgui",
114 "iladministrationgui");
124 $this->save_parameter = array();
125 $this->parameter = array();
126 $this->
return = array();
127 $this->tab = array();
128 $this->current_node = 0;
129 $this->call_node = array();
130 $this->root_class =
"";
144 $ilDB = $DIC->database();
146 $baseClass = strtolower(
$_GET[
"baseClass"]);
149 $mc_rec = $module_class->lookupModuleClass($baseClass);
151 $module = $mc_rec[
"module"];
152 $class = $mc_rec[
"class"];
153 $class_dir = $mc_rec[
"dir"];
156 $m_set =
$ilDB->query(
"SELECT * FROM il_component WHERE name = " .
157 $ilDB->quote($module,
"text"));
158 $m_rec =
$ilDB->fetchAssoc($m_set);
160 $mc_rec = $module_class->lookupServiceClass($baseClass);
163 $class = $mc_rec[
"class"];
164 $class_dir = $mc_rec[
"dir"];
167 include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
168 throw new ilCtrlException(
"Could not find entry in modules.xml or services.xml for " .
169 $baseClass .
" <br/>" . str_replace(
"&",
"<br />&", htmlentities(
$_SERVER[
"REQUEST_URI"])));
177 $base_class_gui =
new $class();
189 throw new Exception(
"ilCtrl::getModuleDir is deprecated.");
204 $class = strtolower(get_class($a_gui_object));
206 $nr = $nr[
"node_id"];
208 $current_node = $this->current_node;
210 $this->current_node = $nr;
214 $this->call_hist[] = array(
"class" => get_class($a_gui_object),
215 "mode" =>
"execComm",
"cmd" => $this->
getCmd());
217 $html = $a_gui_object->executeCommand();
220 $this->current_node = $current_node;
225 include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
238 public function getHTML($a_gui_object, array $a_parameters = null, array $class_path = [])
240 $class = strtolower(get_class($a_gui_object));
242 if (count($class_path) > 0) {
243 $class_path = array_merge($class_path, [$class]);
246 $baseclass = $p[
"baseClass"];
247 $this->inner_base_class = $p[
"cmdNode"];
250 $nr = $nr[
"node_id"];
254 $this->use_current_to_determine_next =
true;
256 if ($baseclass !=
$_GET[
"baseClass"]) {
257 $this->inner_base_class = $baseclass;
259 $current_node = $this->current_node;
262 $this->current_node = $nr;
266 $this->call_hist[] = array(
"class" => get_class($a_gui_object),
267 "mode" =>
"getHtml",
"cmd" => $this->
getCmd());
270 if ($a_parameters != null) {
271 $html = $a_gui_object->getHTML($a_parameters);
273 $html = $a_gui_object->getHTML();
277 $this->current_node = $current_node;
278 $this->inner_base_class = $current_inner_base_class;
279 $this->use_current_to_determine_next =
false;
285 include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
298 public function setContext($a_obj_id, $a_obj_type, $a_sub_obj_id = 0, $a_sub_obj_type =
"")
300 $this->context_obj_id = $a_obj_id;
301 $this->context_obj_type = $a_obj_type;
302 $this->context_sub_obj_id = $a_sub_obj_id;
303 $this->context_sub_obj_type = $a_sub_obj_type;
313 return $this->context_obj_id;
323 return $this->context_obj_type;
333 return $this->context_sub_obj_id;
343 return $this->context_sub_obj_type;
368 $class = strtolower($a_class);
371 if ($a_par_node === 0 || $a_par_node ==
"") {
373 "base_class" => $class);
382 return array(
"node_id" => $a_par_node,
389 in_array($a_class, $this->calls[$this->
getClassForCid($node_cid)])) {
390 return array(
"node_id" => $a_par_node .
":" . $this->
getCidForClass($class),
396 if ($par_cid !=
"") {
398 in_array($a_class, $this->calls[$this->
getClassForCid($par_cid)])) {
399 return array(
"node_id" =>
407 while ($temp_node !=
"") {
410 return array(
"node_id" => $temp_node,
418 if ($a_class !=
"") {
420 $mc_rec = $module_class->lookupModuleClass($class);
421 $n_class = $mc_rec[
'lower_class'];
423 if ($n_class ==
"") {
424 $mc_rec = $module_class->lookupServiceClass($class);
425 $n_class = $mc_rec[
'lower_class'];
428 if ($n_class !=
"") {
431 "base_class" => $class);
443 error_log(
"ERROR: Can't find target class $a_class for node $a_par_node " .
444 "(" . $this->cid_class[$this->
getCidOfNode($a_par_node)] .
")");
446 include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
447 throw new ilCtrlException(
"ERROR: Can't find target class $a_class for node $a_par_node " .
448 "(" . $this->cid_class[$this->
getCidOfNode($a_par_node)] .
").");
459 if (!is_array($a_class)) {
460 $a_class = array($a_class);
463 $nr = $this->current_node;
464 foreach ($a_class as $class) {
465 $class = strtolower($class);
472 $nr = $nr[
"node_id"];
487 return $_GET[
"cmdNode"];
498 public function addTab($a_lang_var, $a_link, $a_cmd, $a_class)
500 $a_class = strtolower($a_class);
502 $this->tab[] = array(
"lang_var" => $a_lang_var,
503 "link" => $a_link,
"cmd" => $a_cmd,
"class" => $a_class);
555 $ilDB = $DIC->database();
557 $a_class = strtolower($a_class);
562 $this->call_node[$a_nr] = array(
"class" => $a_class,
"parent" => $a_parent);
564 $call_set =
$ilDB->query(
"SELECT * FROM ctrl_calls WHERE parent = " .
565 $ilDB->quote(strtolower($a_class),
"text") .
566 " ORDER BY child", array(
"text"));
568 while ($call_rec =
$ilDB->fetchAssoc($call_set)) {
570 $forw[] = $call_rec[
"child"];
574 $this->root_class = $a_class;
599 if (is_object($a_obj)) {
612 if (is_array($a_parameter)) {
614 $this->save_parameter[strtolower($a_class)][] =
$parameter;
617 $this->save_parameter[strtolower($a_class)][] = $a_parameter;
646 $this->parameter[strtolower(get_class($a_obj))][$a_parameter] = $a_value;
659 $this->parameter[strtolower($a_class)][$a_parameter] = $a_value;
671 unset($this->parameter[strtolower($a_class)][$a_parameter]);
693 $this->parameter[strtolower($a_class)] = array();
700 $objDefinition = $DIC[
"objDefinition"];
703 if (
$_GET[
"gotolp"] &&
705 $ref_id =
$_GET[
"ref_id"];
707 $ref_id = $_REQUEST[
"ref_id"];
710 $gui_class = get_class($a_gui_obj);
712 if ($gui_class ==
"ilSAHSEditGUI") {
714 include_once
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
718 $class =
"ilObjSCORM2004LearningModuleGUI";
722 $class =
"ilObjSCORMLearningModuleGUI";
726 $class =
"ilObjAICCLearningModuleGUI";
730 $class =
"ilObjHACPLearningModuleGUI";
733 if (
$GLOBALS[
"ilAccess"]->checkAccess(
"edit_learning_progress",
"", $ref_id)) {
734 $this->
redirectByClass(array($gui_class, $class,
"illearningprogressgui",
"illplistofsettingsgui"),
"");
738 elseif ($gui_class ==
"ilLMPresentationGUI") {
740 $this->
redirectByClass(array(
"ilLMEditorGUI",
"ilObjLearningModuleGUI"),
"");
743 include_once
"Services/Object/classes/class.ilObjectLP.php";
745 $class =
"ilObj" . $objDefinition->getClassName(
$type) .
"GUI";
747 if ($gui_class == $class &&
749 $GLOBALS[
"ilAccess"]->checkAccess(
"edit_learning_progress",
"", $ref_id)) {
754 $a_cmd_node = $obj_node[
"node_id"];
759 $_GET[
"cmdNode"] = $lp_settings_node[
"node_id"];
760 $_GET[
"cmdClass"] =
"ilLPListOfSettingsGUI";
762 return "illearningprogressgui";
777 if ($this->use_current_to_determine_next) {
778 $cmdNode = $this->current_node;
783 if ($cmdNode ==
"") {
788 if ($this->current_node == $cmdNode) {
793 $path = $this->
getPathNew($this->current_node, $cmdNode);
808 $a_class_name = strtolower($a_class_name);
811 $class_rec = $cached_ctrl->lookupClassFile($a_class_name);
813 if ($class_rec[
"plugin_path"] !=
"") {
814 return $class_rec[
"plugin_path"] .
"/" . $class_rec[
"filename"];
816 return $class_rec[
"filename"];
830 $path = pathinfo($a_class_path);
831 $file = $path[
"basename"];
832 $class = substr($file, 6, strlen($file) - 10);
845 if ($a_source_node ==
"1") {
848 if (substr($a_target_node, 0, strlen($a_source_node)) != $a_source_node) {
849 $failure =
"ERROR: Path not found. Source:" . $a_source_node .
850 ", Target:" . $a_target_node;
852 include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
856 $this->
redirectToURL(
'./ilias.php?baseClass=ilRepositoryGUI');
858 $temp_node = $a_source_node;
861 if ($a_source_node !=
"") {
862 $path = array($a_source_node);
865 $diffstart = ($a_source_node ==
"")
867 : strlen($a_source_node) + 1;
868 $diff = substr($a_target_node, $diffstart);
869 $diff_arr = explode(
":", $diff);
870 foreach ($diff_arr as $cid) {
871 if ($temp_node !=
"") {
875 $path[] = $temp_node;
887 $this->target_script = $a_target_script;
899 array_map(
function ($cid) {
901 }, explode(
":", $node))
926 $_GET[
"baseClass"] = $a_base_class;
928 $_GET[
"cmdClass"] =
"";
929 $_GET[
"cmdNode"] =
"";
940 public function getCmd($a_default_cmd =
"", $a_safe_commands =
"")
943 if (isset(
$_GET[
"cmd"])) {
946 if ($cmd ==
"post") {
950 $cmd = @key(
$_POST[
"cmd"]);
953 if ($this->verified_cmd !=
"") {
954 return $this->verified_cmd;
957 (!is_array($a_safe_commands) || !in_array($cmd, $a_safe_commands))) {
958 return $a_default_cmd;
962 $this->verified_cmd = $cmd;
963 if ($cmd ==
"" && isset(
$_POST[
"table_top_cmd"])) {
964 $cmd = @key(
$_POST[
"table_top_cmd"]);
965 $this->verified_cmd = $cmd;
966 $_POST[
$_POST[
"cmd_sv"][$cmd]] = $_POST[$_POST[
"cmd_sv"][$cmd] .
"_2"];
968 if ($cmd ==
"" && isset(
$_POST[
"select_cmd2"])) {
969 if (isset(
$_POST[
"select_cmd_all2"])) {
972 $_POST[
"select_cmd_all"] =
$_POST[
"select_cmd_all2"] = null;
974 $cmd =
$_POST[
"selected_cmd2"];
975 $this->verified_cmd = $cmd;
977 if ($cmd ==
"" && isset(
$_POST[
"select_cmd"])) {
978 if (isset(
$_POST[
"select_cmd_all"])) {
981 $_POST[
"select_cmd_all"] =
$_POST[
"select_cmd_all2"] = null;
983 $cmd =
$_POST[
"selected_cmd"];
984 $this->verified_cmd = $cmd;
987 $cmd =
$_GET[
"fallbackCmd"];
988 $this->verified_cmd = $cmd;
992 $cmd = $a_default_cmd;
1009 $_GET[
"cmd"] = $a_cmd;
1024 $a_cmd_class = strtolower($a_cmd_class);
1026 $nr = $nr[
"node_id"];
1027 $_GET[
"cmdClass"] = $a_cmd_class;
1028 $_GET[
"cmdNode"] = $nr;
1038 return strtolower(
$_GET[
"cmdClass"]);
1053 $a_fallback_cmd =
"",
1059 strtolower(get_class($a_gui_obj)),
1080 $a_fallback_cmd =
"",
1085 if (!is_array($a_class)) {
1086 $a_class = strtolower($a_class);
1096 if ($a_fallback_cmd !=
"") {
1104 if ($a_anchor !=
"") {
1105 $script = $script .
"#" . $a_anchor;
1136 $ilDB = $DIC->database();
1139 if ($this->rtoken !=
"") {
1144 $res =
$ilDB->query(
"SELECT token FROM il_request_token WHERE user_id = " .
1146 " AND session_id = " .
$ilDB->quote(session_id(),
"text"));
1148 if ($rec[
"token"] !=
"") {
1149 $this->rtoken = $rec[
"token"];
1150 return $rec[
"token"];
1153 $random = new \ilRandom();
1154 $this->rtoken = md5(uniqid($random->int(),
true));
1157 if ($random->int(1, 200) == 2) {
1161 $dq =
"DELETE FROM il_request_token WHERE " .
1163 $ilDB->manipulate($dq);
1170 $ilDB->manipulate(
"INSERT INTO il_request_token (user_id, token, stamp, session_id) VALUES " .
1173 $ilDB->quote($this->rtoken,
"text") .
"," .
1174 $ilDB->now() .
"," .
1175 $ilDB->quote(session_id(),
"text") .
")");
1193 $ilDB = $DIC->database();
1198 if (
$_GET[
"rtoken"] ==
"") {
1202 $set =
$ilDB->query(
"SELECT * FROM il_request_token WHERE " .
1203 " user_id = " .
$ilDB->quote(
$ilUser->getId(),
"integer") .
" AND " .
1204 " token = " .
$ilDB->quote(
$_GET[self::IL_RTOKEN_NAME]),
"text");
1205 if (
$ilDB->numRows($set) > 0) {
1216 $ilDB->manipulate(
"DELETE FROM il_request_token WHERE " .
1217 " user_id = " .
$ilDB->quote(
$ilUser->getId(),
"integer") .
" AND " .
1218 " session_id != " .
$ilDB->quote(session_id(),
"text") .
" AND " .
1230 if (count(
$_SESSION[
"rtokens"]) > 100) {
1231 $to_remove = array();
1234 foreach (
$_SESSION[
"rtokens"] as $tok => $time) {
1235 if (time() - $time > $sec) {
1236 $to_remove[] = $tok;
1239 foreach ($to_remove as $tok) {
1261 public function redirect($a_gui_obj, $a_cmd =
"", $a_anchor =
"", $a_asynch =
false)
1264 strtolower(get_class($a_gui_obj)),
1270 if ($a_anchor !=
"") {
1271 $script = $script .
"#" . $a_anchor;
1284 $ilPluginAdmin = null;
1285 if (isset($DIC[
"ilPluginAdmin"])) {
1286 $ilPluginAdmin = $DIC[
"ilPluginAdmin"];
1289 if (!is_int(strpos($a_script,
"://"))) {
1290 if (substr($a_script, 0, 1) !=
"/" && defined(
"ILIAS_HTTP_PATH")) {
1291 if (is_int(strpos(
$_SERVER[
"PHP_SELF"],
"/setup/"))) {
1292 $a_script =
"setup/" . $a_script;
1294 $a_script = ILIAS_HTTP_PATH .
"/" . $a_script;
1299 if (is_object($ilPluginAdmin)) {
1300 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
1301 foreach ($pl_names as $pl) {
1303 $gui_class = $ui_plugin->getUIClassInstance();
1304 $resp = $gui_class->getHTML(
"Services/Utilities",
"redirect", array(
"html" => $a_script ));
1306 $a_script = $gui_class->modifyHTML($a_script,
$resp);
1315 session_write_close();
1318 $http = $DIC->http();
1319 switch (
$http->request()->getHeaderLine(
'Accept')) {
1320 case 'application/json':
1323 'message' =>
'Called redirect after async fileupload request',
1324 "redirect_url" => $a_script,
1326 $http->saveResponse(
$http->response()->withBody($stream));
1329 $http->saveResponse(
$http->response()->withAddedHeader(
"Location", $a_script));
1332 $http->sendResponse();
1346 if ($a_anchor !=
"") {
1347 $script = $script .
"#" . $a_anchor;
1359 if (isset(
$_GET[
"cmdMode"]) &&
$_GET[
"cmdMode"] ==
"asynch") {
1386 strtolower(get_class($a_gui_obj)),
1423 $script .= $amp .
"cmdMode=asynch";
1426 if ($a_anchor !=
"") {
1427 $script = $script .
"#" . $a_anchor;
1439 $script = $this->
getUrlParameters(strtolower(get_class($a_gui_obj)), $script, $a_cmd);
1440 $this->
return[strtolower(get_class($a_gui_obj))] = $script;
1449 $a_class = strtolower($a_class);
1453 $this->
return[strtolower($a_class)] = $script;
1465 "redirectSource=" . strtolower(get_class($a_gui_obj))
1469 "cmdMode=" .
$_GET[
"cmdMode"]
1471 if ($a_anchor !=
"") {
1472 $script = $script .
"#" . $a_anchor;
1497 $a_class = strtolower($a_class);
1500 return $this->
return[$ret_class];
1514 if (is_object($a_class)) {
1515 $class = strtolower(get_class($a_class));
1517 $class = strtolower($a_class);
1528 $a_class = strtolower($a_class);
1531 $node = $node[
"node_id"];
1532 $n_arr = explode(
":", $node);
1533 for (
$i = count($n_arr) - 2;
$i >= 0;
$i--) {
1549 return $_GET[
"redirectSource"];
1564 foreach ($params as $par => $value) {
1565 if (strlen((
string) $value)) {
1592 if ($a_class ==
"") {
1596 $current_base_class =
$_GET[
"baseClass"];
1597 if ($this->use_current_to_determine_next && $this->inner_base_class !=
"") {
1601 if (!is_array($a_class)) {
1602 $a_class = array($a_class);
1605 $nr = $this->current_node;
1606 $new_baseclass =
"";
1607 foreach ($a_class as $class) {
1608 $class = strtolower($class);
1610 if ($nr[
"base_class"] !=
"") {
1611 $new_baseclass = $nr[
"base_class"];
1613 $nr = $nr[
"node_id"];
1614 $target_class = $class;
1621 foreach ($path as $node_id) {
1622 $class = ($node_id ==
"")
1623 ? strtolower($current_base_class)
1625 if (isset($this->save_parameter[$class]) && is_array($this->save_parameter[$class])) {
1626 foreach ($this->save_parameter[$class] as $par) {
1627 if (isset(
$_GET[$par])) {
1628 $params[$par] =
$_GET[$par];
1629 } elseif (isset(
$_POST[$par])) {
1635 if (isset($this->parameter[$class]) && is_array($this->parameter[$class])) {
1636 foreach ($this->parameter[$class] as $par => $value) {
1637 $params[$par] = $value;
1643 $params[
"cmd"] = $a_cmd;
1646 $params[
"cmdClass"] = $target_class;
1647 $params[
"cmdNode"] = $nr;
1648 if ($new_baseclass ==
"") {
1649 $params[
"baseClass"] = $current_base_class;
1651 $params[
"baseClass"] = $new_baseclass;
1659 return $this->class_cid[$a_class] ==
"";
1675 $add =
"<br><br>Please make sure your GUI class name ends with 'GUI' and that the filename is 'class.[YourClassName].php'. In exceptional cases you 1676 may solve the issue by putting an empty * @ilCtrl_Calls [YourClassName]: into your class header." .
1677 " In both cases you need to reload the control structure in the setup.";
1679 include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
1680 throw new ilCtrlException(
"Cannot find cid for class " . $a_class .
"." . $add);
1682 return $this->class_cid[$a_class];
1687 return $this->cid_class[$a_cid] ==
"";
1700 include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
1701 throw new ilCtrlException(
"Cannot find class for cid " . $a_cid .
".");
1703 return $this->cid_class[$a_cid];
1708 foreach ($a_cached_ctrl->
lookupCall($a_class) as $call) {
1710 $this->calls[$a_class][] = $call[
"child"];
1723 if (isset($this->info_read_cid[$a_cid])) {
1728 $cid_info = $cached_ctrl->lookupCid($a_cid);
1733 $this->info_read_class[$cid_info[
"class"]] =
true;
1736 $this->info_read_cid[$a_cid] =
true;
1747 $class_ids = explode(
":", $a_node);
1748 foreach ($class_ids as $cid) {
1761 $a_class = strtolower($a_class);
1762 if (isset($this->info_read_class[$a_class])) {
1767 $class_info = $cached_ctrl->lookupClassFile($a_class);
1774 $this->info_read_class[$a_class] =
true;
1775 $this->info_read_cid[$this->class_cid[$a_class]] =
true;
1780 return !isset($this->calls[$a_class])
1781 || !is_array($this->calls[$a_class])
1782 || !in_array($a_child, $this->calls[$a_class]);
1787 $this->cid_class[$a_cid] = $a_class;
1788 $this->class_cid[$a_class] = $a_cid;
1796 $class_ids = explode(
":", $a_node);
1797 return $class_ids[count($class_ids) - 2];
1805 $class_ids = explode(
":", $a_node);
1806 return $class_ids[count($class_ids) - 1];
1814 $lpos = strrpos($a_node,
":");
1815 return substr($a_node, 0, $lpos);
1823 $n_arr = explode(
":", $a_node);
1824 return $n_arr[count($n_arr) - 1];
1837 $ilDB = $DIC->database();
1840 $a_parent = strtolower($a_parent);
1841 $a_child = strtolower($a_child);
1842 $a_comp_prefix = strtolower($a_comp_prefix);
1844 $set =
$ilDB->query(
1845 "SELECT * FROM ctrl_calls WHERE " .
1846 " parent = " .
$ilDB->quote($a_parent,
"text") .
" AND " .
1847 " child = " .
$ilDB->quote($a_child,
"text") .
" AND " .
1848 " comp_prefix = " .
$ilDB->quote($a_comp_prefix,
"text")
1850 if ($rec =
$ilDB->fetchAssoc($set)) {
1853 $ilDB->manipulate(
"INSERT IGNORE INTO ctrl_calls " .
1854 "(parent, child, comp_prefix) VALUES (" .
1855 $ilDB->quote($a_parent,
"text") .
"," .
1856 $ilDB->quote($a_child,
"text") .
"," .
1857 $ilDB->quote($a_comp_prefix,
"text") .
1870 foreach (explode(
":", $this->
getCmdNode()) as $cid) {
1871 if ($cid !=
"" && strtolower($this->
getClassForCid($cid)) == strtolower($gui_class)) {
1887 foreach (explode(
":", $this->
getCmdNode()) as $cid) {
1893 $path[] =
$_GET[
"baseClass"];
getCurrentCidOfNode($a_node)
Get cid of node.
removeLastCid($a_node)
Remove the class id that comes at the beginning the sequence.
getReturnClass($a_class)
Get return class.
getLinkTargetByClass( $a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get link target for command using gui class name.
setParameter($a_obj, $a_parameter, $a_value)
Set parameters that should be passed a form and link of a gui class.
getContextObjId()
Get context object id.
This class provides processing control methods.
setReturn($a_gui_obj, $a_cmd)
Set return command.
getTabs()
Get tabs array (.
getCmdNode()
Get command target node.
lookupClassPath($a_class_name)
Get class path that can be used in include statements for a given class name.
appendRequestTokenParameterString($a_url, $xml_style=false)
Append request token as url parameter.
getCmdClass()
Determines class that should execute the current command.
getParentCidOfNode($a_node)
Get 2nd to last class id of node.
getClassForClasspath($a_class_path)
this method assumes that the class path has the format "dir/class.<class_name>.php" ...
setCmdClass($a_cmd_class)
Set the current command class.
getRequestToken()
Get request token.
checkLPSettingsForward($a_gui_obj, $a_cmd_node)
getCidOfNode($a_node)
Get last class id of node.
initBaseClass($a_base_class)
Initialises new base class.
$use_current_to_determine_next
getNodeIdForTargetClass($a_par_node, $a_class, $a_check=false)
Searches a node for a given class ($a_class) "near" another node ($a_par_node).
checkTargetClass($a_class)
Check whether target is valid.
getParameterArrayByClass($a_class, $a_cmd="")
Get all set/save parameters using gui class name.
getClassForCid($a_cid)
Get class for class id after fetching and storing corresponding information, if necessary.
searchReturnClass($a_class)
Determine current return class.
$calls
Stores which class calls which other class.
checkCurrentPathForClass($gui_class)
Check if current path contains a certain gui class.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
getRedirectSource()
Get current redirect source.
getCallStructure($a_class)
Get call structure of class context.
getContextSubObjType()
Get context subobject type.
saveParameterByClass($a_class, $a_parameter)
Save parameter for a class.
setCmd($a_cmd)
Set the current command.
static _lookupObjectId($a_ref_id)
lookup object id
getContextSubObjId()
Get context subobject id.
initializeMemberVariables()
Initialize member variables.
isAsynch()
Is current command an asynchronous command?
setReturnByClass($a_class, $a_cmd)
Set return command.
getCidForClass($a_class, $a_check=false)
Get class id for class after fetching and storing corresponding information, if necessary.
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
readCidInfo($a_cid)
Save class respective to $a_cid and store corresponding class calls for future reference.
updateClassCidMap($a_class, $a_cid)
getNextClass($a_gui_class=null)
Get next class in the control path from the current class to the target command class.
fetchCallsOfClassFromCache($a_class, ilCachedCtrl $a_cached_ctrl)
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get form action url for gui class object.
foreach($_POST as $key=> $value) $res
setContext($a_obj_id, $a_obj_type, $a_sub_obj_id=0, $a_sub_obj_type="")
Set context of current user interface.
getParameterArray($a_gui_obj, $a_cmd="")
Get all set/save parameters for a gui object.
redirectByClass($a_class, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to other gui class using class name.
clearParameters($a_obj)
Clears all parameters that have been set via setParameter for a GUI class.
clearParametersByClass($a_class)
Clears all parameters that have been set via setParameter for a GUI class.
insertCtrlCalls($a_parent, $a_child, $a_comp_prefix)
Insert ctrl calls record.
getPathNew($a_source_node, $a_target_node)
Get path in call structure.
getCmd($a_default_cmd="", $a_safe_commands="")
Determines current get/post command.
getUrlParameters($a_class, $a_str, $a_cmd="", $xml_style=false)
Get URL parameters for a class and append them to a string.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.
readClassInfo($a_class)
Save class id respective to $a_class and store corresponding class calls for future reference...
static ofString($string)
Creates a new stream with an initial value.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
getTargetScript()
Get target script name.
verifyToken()
Verify Token.
saveParameter($a_obj, $a_parameter)
Set parameters that should be passed in every form and link of a gui class.
static _lookupType($a_id, $a_reference=false)
lookup object type
readNodeInfo($a_node)
Save classes respective to the class id's of a node and store corresponding class calls for future re...
getParentReturn($a_gui_obj)
Get return script url.
getCurrentClassPath()
Get current class path as array of class file names.
getModuleDir()
get directory of current module
clearParameterByClass($a_class, $a_parameter)
Same as setParameterByClass, except that a class name is passed.
static isSupportedObjectType($type)
classCidUnknown($a_class)
setTargetScript(string $a_target_script)
set target script name
setParameterByClass($a_class, $a_parameter, $a_value)
Same as setParameterByClass, except that a class name is passed.
getCallHistory()
Get controller call history.
callBaseClass()
Calls base class of current request.
returnToParent($a_gui_obj, $a_anchor="")
Redirects to next parent class that used setReturn.
getLinkTarget( $a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get link target for command using gui object.
getParentReturnByClass($a_class)
Get return script url.
getReadableNode($node)
Get readable node.
$call_hist
Stores the order in which different GUI classes were called.
readCallStructure($a_class, $a_nr=0, $a_parent=0)
Reads call structure from db.
getHTML($a_gui_object, array $a_parameters=null, array $class_path=[])
Gets an HTML output from another GUI class and returns the flow of control to the calling class...
getFormActionByClass( $a_class, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get form action url for gui class name.
forwardCommand($a_gui_object)
Forward flow of control to next gui class this invokes the executeCommand() method of the gui object ...
callOfClassNotKnown($a_class, $a_child)
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.
getContextObjType()
Get context object type.
__construct()
control class constructor
static getComponentInfo($a_type, $a_name)
addTab($a_lang_var, $a_link, $a_cmd, $a_class)
Add a tab to tabs array (.