/srv/www/hwk-leipzig.digital/ilias/Services/UICore/classes/class.ilCtrl.php
return $class;
}
/**
* Get path in call structure.
*
* @param string $a_source_node source node id
* @param string $a_source_node target node id
*/
private function getPathNew($a_source_node, $a_target_node)
{
if ($a_source_node == "1") {
$a_source_node = "";
}
if (substr($a_target_node, 0, strlen($a_source_node)) != $a_source_node) {
$failure = "ERROR: Path not found. Source:" . $a_source_node .
", Target:" . $a_target_node;
if (DEVMODE == 1) {
include_once("./Services/UICore/exceptions/class.ilCtrlException.php");
throw new ilCtrlException($failure);
}
$GLOBALS['ilLog']->write(__METHOD__ . ' ' . $failure);
$this->redirectToURL('./ilias.php?baseClass=ilRepositoryGUI');
}
$temp_node = $a_source_node;
$path = array();
if ($a_source_node != "") {
$path = array($a_source_node);
}
$diffstart = ($a_source_node == "")
? 0
: strlen($a_source_node) + 1;
$diff = substr($a_target_node, $diffstart);
$diff_arr = explode(":", $diff);
foreach ($diff_arr as $cid) {
if ($temp_node != "") {
$temp_node .= ":";
}
Arguments
"ERROR: Path not found. Source:110, Target:10y"
/srv/www/hwk-leipzig.digital/ilias/Services/UICore/classes/class.ilCtrl.php
*/
public function getNextClass($a_gui_class = null)
{
if ($this->use_current_to_determine_next) {
$cmdNode = $this->current_node;
} else {
$cmdNode = $this->getCmdNode();
}
if ($cmdNode == "") {
return ($class = $this->checkLPSettingsForward($a_gui_class, $cmdNode))
? $class
: false;
} else {
if ($this->current_node == $cmdNode) {
return ($class = $this->checkLPSettingsForward($a_gui_class, $cmdNode))
? $class
: "";
} else {
$path = $this->getPathNew($this->current_node, $cmdNode);
$this->readCidInfo($this->getCurrentCidOfNode($path[1]));
return $this->cid_class[$this->getCurrentCidOfNode($path[1])];
}
}
}
/**
* Get class path that can be used in include statements
* for a given class name.
*
* @param string $a_class_name class name
*/
public function lookupClassPath($a_class_name)
{
$a_class_name = strtolower($a_class_name);
$cached_ctrl = ilCachedCtrl::getInstance();
$class_rec = $cached_ctrl->lookupClassFile($a_class_name);
if ($class_rec["plugin_path"] != "") {
Arguments
/srv/www/hwk-leipzig.digital/ilias/Services/Init/classes/class.ilStartUpGUI.php
$this->ctrl = $DIC->ctrl();
$this->lng = $DIC->language();
$this->lng->loadLanguageModule('auth');
$this->logger = ilLoggerFactory::getLogger('init');
$this->ctrl->saveParameter($this, array("rep_ref_id", "lang", "target", "client_id"));
$this->user->setLanguage($this->lng->getLangKey());
$this->help->setScreenIdComponent('init');
}
/**
* execute command
* @see register.php
*/
public function executeCommand()
{
$cmd = $this->ctrl->getCmd("processIndexPHP", array('processIndexPHP','showLoginPage'));
$next_class = $this->ctrl->getNextClass($this);
switch ($next_class) {
case 'ilLoginPageGUI':
break;
case "ilaccountregistrationgui":
require_once("Services/Registration/classes/class.ilAccountRegistrationGUI.php");
return $this->ctrl->forwardCommand(new ilAccountRegistrationGUI());
case "ilpasswordassistancegui":
require_once("Services/Init/classes/class.ilPasswordAssistanceGUI.php");
return $this->ctrl->forwardCommand(new ilPasswordAssistanceGUI());
default:
if (method_exists($this, $cmd)) {
return $this->$cmd();
}
}
}
Arguments
/srv/www/hwk-leipzig.digital/ilias/Services/UICore/classes/class.ilCtrl.php
* @param object $a_gui_object gui object that should receive
* @return mixed return data of invoked executeCommand() method
* @throws ilCtrlException
*/
public function forwardCommand($a_gui_object)
{
$class = strtolower(get_class($a_gui_object));
$nr = $this->getNodeIdForTargetClass($this->current_node, $class);
$nr = $nr["node_id"];
if ($nr != "") {
$current_node = $this->current_node;
$this->current_node = $nr;
// always populate the call history
// it will only be displayed in DEVMODE but is needed for UI plugins, too
$this->call_hist[] = array("class" => get_class($a_gui_object),
"mode" => "execComm", "cmd" => $this->getCmd());
$html = $a_gui_object->executeCommand();
// reset current node
$this->current_node = $current_node;
return $html;
}
include_once("./Services/UICore/exceptions/class.ilCtrlException.php");
throw new ilCtrlException("ERROR: Can't forward to class $class.");
}
/**
* Gets an HTML output from another GUI class and
* returns the flow of control to the calling class.
*
* @param object $a_gui_object GUI class that implements getHTML() method to return its HTML
* @param array|null $a_parameters parameter array
* @return string
* @throws ilCtrlException
*/
/srv/www/hwk-leipzig.digital/ilias/Services/UICore/classes/class.ilCtrl.php
} else { // check whether class belongs to a service
$mc_rec = $module_class->lookupServiceClass($baseClass);
$service = $mc_rec["service"];
$class = $mc_rec["class"];
$class_dir = $mc_rec["dir"];
if ($service == "") {
include_once("./Services/UICore/exceptions/class.ilCtrlException.php");
throw new ilCtrlException("Could not find entry in modules.xml or services.xml for " .
$baseClass . " <br/>" . str_replace("&", "<br />&", htmlentities($_SERVER["REQUEST_URI"])));
}
$m_rec = ilComponent::getComponentInfo('Services', $service);
}
// forward processing to base class
$this->getCallStructure(strtolower($baseClass));
$base_class_gui = new $class();
$this->forwardCommand($base_class_gui);
}
/**
* get directory of current module
* @deprecated
* @return mixed
* @throws Exception
*/
public function getModuleDir()
{
throw new Exception("ilCtrl::getModuleDir is deprecated.");
//return $this->module_dir;
}
/**
* Forward flow of control to next gui class
* this invokes the executeCommand() method of the
* gui object that is passed via reference
*
* @param object $a_gui_object gui object that should receive
Arguments
/srv/www/hwk-leipzig.digital/ilias/ilias.php
/**
* ilias.php. main script.
*
* If you want to use this script your base class must be declared
* within modules.xml.
*
* @author Alex Killing <alex.killing@gmx.de>
* @version $Id$
*
*/
require_once("Services/Init/classes/class.ilInitialisation.php");
ilInitialisation::initILIAS();
/**
* @var $DIC \ILIAS\DI\Container
*/
global $DIC, $ilBench;
$DIC->ctrl()->callBaseClass();
$ilBench->save();