ILIAS
trunk Revision v11.0_alpha-1749-g1a06bdef097
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
callBaseClass (?string $a_base_class=null) | |
Calls the currently provided baseclass. More... | |
forwardCommand (object $a_gui_object) | |
Forwards the request by invoking executeCommand() on the given GUI object and fires an according ilCtrlEvent. More... | |
getHTML (object $a_gui_object, ?array $a_parameters=null) | |
Returns the HTML output of another GUI object by invoking getHTML() with optional parameters on it. More... | |
getCmd (?string $fallback_command=null) | |
Returns the command passed with the current POST or GET request and fires an according ilCtrlEvent. More... | |
getCmdClass () | |
Returns the fully-qualified classname of the requested command class. More... | |
getNextClass ($a_gui_class=null) | |
Returns the fully-qualified classname of the next class in the control flow. More... | |
saveParameter (object $a_gui_obj, $a_parameter) | |
Sets parameters for the given object. More... | |
saveParameterByClass (string $a_class, $a_parameter) | |
Sets a parameter for the given GUI class that must be passed in every target link generation. More... | |
setParameter (object $a_gui_obj, string $a_parameter, $a_value) | |
Sets a parameter for the given GUI object and appends the given value. More... | |
setParameterByClass (string $a_class, string $a_parameter, $a_value) | |
Sets a parameter for the given GUI class and appends the given value as well. More... | |
getParameterArray (object $a_gui_obj) | |
Returns all parameters that have been saved or set for a GUI object. More... | |
getParameterArrayByClass (string $a_class) | |
Returns all parameters that have been saved or set for a given GUI class. More... | |
clearParameters (object $a_gui_obj) | |
Removes all currently set or saved parameters for the given GUI object. More... | |
clearParametersByClass (string $a_class) | |
Removes all currently set or saved parameters for the given GUI class. More... | |
clearParameterByClass (string $a_class, string $a_parameter) | |
Removes a specific parameter of a specific class that is currently set or saved. More... | |
getLinkTarget (object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false) | |
Returns a link target for the given information. More... | |
getLinkTargetByClass ( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false) | |
Returns a link target for the given information. More... | |
getFormAction (object $a_gui_obj, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false) | |
Returns a form action link for the given information. More... | |
getFormActionByClass ( $a_class, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false) | |
Returns a form action link for the given information. More... | |
redirect (object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false) | |
Redirects to another GUI object. More... | |
redirectByClass ( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false) | |
Redirects to the provided GUI class. More... | |
redirectToURL (string $target_url) | |
Redirects to the given target URL. More... | |
setContextObject (int $obj_id, string $obj_type) | |
Sets the current object (id and type) of ilCtrl's context. More... | |
getContextObjId () | |
Returns the current context's object id. More... | |
getContextObjType () | |
Returns the current context's object type. More... | |
getCallHistory () | |
Returns the descending stacktrace of ilCtrl calls that have been made. More... | |
lookupClassPath (string $a_class) | |
Get class path that can be used in include statements for a given class name. More... | |
lookupOriginalClassName (string $a_class) | |
This method was introduced due to composer being case-sensitive when autoloading classes. More... | |
getClassForClasspath (string $a_class_path) | |
Returns the effective classname for a given path. More... | |
setTargetScript (string $a_target_script) | |
Sets the current ilCtrl target script (default ilias.php). More... | |
isAsynch () | |
Returns whether the current request is an asynchronous one. More... | |
setReturn (object $a_gui_obj, ?string $a_cmd=null) | |
Sets the return command of a given GUI object. More... | |
setReturnByClass (string $a_class, ?string $a_cmd=null) | |
Sets the return command of a given class. More... | |
getParentReturn (object $a_gui_obj) | |
getParentReturnByClass (string $a_class) | |
returnToParent (object $a_gui_obj, ?string $a_anchor=null) | |
Redirects to next parent class set with setReturn(). More... | |
getRedirectSource () | |
Returns the current redirect source. More... | |
insertCtrlCalls ($a_parent, $a_child, string $a_comp_prefix) | |
Inserts an ilCtrl call record into the database. More... | |
checkCurrentPathForClass (string $gui_class) | |
Check if current CID trace contains a certain gui class. More... | |
getCurrentClassPath () | |
Get current class path as array of class file names. More... | |
attachObserver (ilCtrlObserver $observer, ilCtrlEvent $event=ilCtrlEvent::ALL) | |
Attaches an observer to ALL or a specific. More... | |
detachObserver (ilCtrlObserver $observer, ilCtrlEvent $event=ilCtrlEvent::ALL) | |
Detaches an observer from ALL or a specific. More... | |
Data Fields | |
const | CMD_POST = 'post' |
const | PARAM_CSRF_TOKEN = 'rtoken' |
$_GET request parameter names, used throughout ilCtrl. More... | |
const | PARAM_CID_PATH = 'cmdNode' |
const | PARAM_REDIRECT = 'redirectSource' |
const | PARAM_BASE_CLASS = 'baseClass' |
const | PARAM_CMD_CLASS = 'cmdClass' |
const | PARAM_CMD_MODE = 'cmdMode' |
const | PARAM_CMD_FALLBACK = 'fallbackCmd' |
const | PARAM_CMD = 'cmd' |
const | PROTECTED_PARAMETERS |
const | CMD_MODE_PROCESS = 'execComm' |
different modes used for UI plugins (or in dev-mode). More... | |
const | CMD_MODE_ASYNC = 'asynch' |
const | CMD_MODE_HTML = 'getHtml' |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilCtrl provides processing control methods. A global instance is available through $DIC->ctrl() or $ilCtrl.
Definition at line 26 of file interface.ilCtrlInterface.php.
ilCtrlInterface::attachObserver | ( | ilCtrlObserver | $observer, |
ilCtrlEvent | $event = ilCtrlEvent::ALL |
||
) |
ilCtrlInterface::callBaseClass | ( | ?string | $a_base_class = null | ) |
Calls the currently provided baseclass.
If no baseclass is provided as an argument, the current GET request MUST contain ilCtrlInterface::PARAM_BASE_CLASS
string | null | $a_base_class |
ilCtrlException | if no valid baseclass is provided. |
Implemented in ilCtrl.
ilCtrlInterface::checkCurrentPathForClass | ( | string | $gui_class | ) |
Check if current CID trace contains a certain gui class.
string | $gui_class |
ilCtrlException |
Implemented in ilCtrl.
ilCtrlInterface::clearParameterByClass | ( | string | $a_class, |
string | $a_parameter | ||
) |
Removes a specific parameter of a specific class that is currently set or saved.
string | $a_class | |
string | $a_parameter |
Implemented in ilCtrl.
Referenced by ilCalendarPresentationGUI\addCategoryTabs().
ilCtrlInterface::clearParameters | ( | object | $a_gui_obj | ) |
Removes all currently set or saved parameters for the given GUI object.
object | $a_gui_obj |
Implemented in ilCtrl.
ilCtrlInterface::clearParametersByClass | ( | string | $a_class | ) |
Removes all currently set or saved parameters for the given GUI class.
string | $a_class |
Implemented in ilCtrl.
ilCtrlInterface::detachObserver | ( | ilCtrlObserver | $observer, |
ilCtrlEvent | $event = ilCtrlEvent::ALL |
||
) |
ilCtrlInterface::forwardCommand | ( | object | $a_gui_object | ) |
Forwards the request by invoking executeCommand() on the given GUI object and fires an according ilCtrlEvent.
If any output was generated in that method, it will be returned by this method as well.
object | $a_gui_object |
ilCtrlException | if executeCommand() cannot be invoked. |
Implemented in ilCtrl.
ilCtrlInterface::getCallHistory | ( | ) |
ilCtrlInterface::getClassForClasspath | ( | string | $a_class_path | ) |
Returns the effective classname for a given path.
string | $a_class_path |
ilCtrlException | in the future. |
Implemented in ilCtrl.
ilCtrlInterface::getCmd | ( | ?string | $fallback_command = null | ) |
Returns the command passed with the current POST or GET request and fires an according ilCtrlEvent.
string | null | $fallback_command |
Implemented in ilCtrl.
Referenced by ilMembershipOverviewGUI\executeCommand().
ilCtrlInterface::getCmdClass | ( | ) |
Returns the fully-qualified classname of the requested command class.
Note this will be lowercase for backwards compatibility.
Implemented in ilCtrl.
ilCtrlInterface::getContextObjId | ( | ) |
Returns the current context's object id.
Implemented in ilCtrl.
ilCtrlInterface::getContextObjType | ( | ) |
Returns the current context's object type.
Implemented in ilCtrl.
ilCtrlInterface::getCurrentClassPath | ( | ) |
ilCtrlInterface::getFormAction | ( | object | $a_gui_obj, |
?string | $a_fallback_cmd = null , |
||
?string | $a_anchor = null , |
||
bool | $is_async = false , |
||
bool | $has_xml_style = false |
||
) |
Returns a form action link for the given information.
object | $a_gui_obj | |
string | null | $a_fallback_cmd | |
string | null | $a_anchor | |
bool | $is_async | |
bool | $has_xml_style |
ilCtrlException | if the provided class cannot be found. |
Implemented in ilCtrl.
Referenced by ilTestSkillLevelThresholdsTableGUI\__construct(), and ilChatroomFormFactory\getSettingsForm().
ilCtrlInterface::getFormActionByClass | ( | $a_class, | |
?string | $a_fallback_cmd = null , |
||
?string | $a_anchor = null , |
||
bool | $is_async = false , |
||
bool | $has_xml_style = false |
||
) |
Returns a form action link for the given information.
string|string[] | $a_class | |
string | null | $a_fallback_cmd | |
string | null | $a_anchor | |
bool | $is_async | |
bool | $has_xml_style |
ilCtrlException | if a provided class cannot be found. |
Implemented in ilCtrl.
ilCtrlInterface::getHTML | ( | object | $a_gui_object, |
?array | $a_parameters = null |
||
) |
Returns the HTML output of another GUI object by invoking getHTML() with optional parameters on it.
object | $a_gui_object | |
array | null | $a_parameters |
ilCtrlException | if getHTML() cannot be invoked. |
Implemented in ilCtrl.
ilCtrlInterface::getLinkTarget | ( | object | $a_gui_obj, |
?string | $a_cmd = null , |
||
?string | $a_anchor = null , |
||
bool | $is_async = false , |
||
bool | $has_xml_style = false |
||
) |
Returns a link target for the given information.
object | $a_gui_obj | |
string | null | $a_cmd | |
string | null | $a_anchor | |
bool | $is_async | |
bool | $has_xml_style |
ilCtrlException | if the provided class cannot be found. |
Implemented in ilCtrl.
Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\__construct(), and ilCalendarViewGUI\addToolbarFileDownload().
ilCtrlInterface::getLinkTargetByClass | ( | $a_class, | |
?string | $a_cmd = null , |
||
?string | $a_anchor = null , |
||
bool | $is_async = false , |
||
bool | $has_xml_style = false |
||
) |
Returns a link target for the given information.
string|string[] | $a_class | |
string | null | $a_cmd | |
string | null | $a_anchor | |
bool | $is_async | |
bool | $has_xml_style |
ilCtrlException | if a provided class cannot be found. |
Implemented in ilCtrl.
Referenced by ilCalendarPresentationGUI\addCategoryTabs(), ilObjLearningModuleListGUI\getCommandLink(), ILIAS\Tracking\View\DataRetrieval\Filter\FilterAdapterGUI\getFilter(), ILIAS\UI\Implementation\Component\Input\Container\Form\FormAdapterGUI\getForm(), ilObjBlogListGUI\insertCommand(), ilCalendarPresentationGUI\prepareOutput(), and ilCalendarPresentationGUI\showViewSelection().
ilCtrlInterface::getNextClass | ( | $a_gui_class = null | ) |
Returns the fully-qualified classname of the next class in the control flow.
Note this will be lowercase for backwards compatibility.
object | string | null | $a_gui_class |
ilCtrlException | if an invalid parameter name is given. |
Implemented in ilCtrl.
Referenced by ilMembershipOverviewGUI\executeCommand().
ilCtrlInterface::getParameterArray | ( | object | $a_gui_obj | ) |
Returns all parameters that have been saved or set for a GUI object.
object | $a_gui_obj |
ilCtrlException | if the given object cannot be found. |
Implemented in ilCtrl.
ilCtrlInterface::getParameterArrayByClass | ( | string | $a_class | ) |
Returns all parameters that have been saved or set for a given GUI class.
string | $a_class |
ilCtrlException | if the given class cannot be found. |
Implemented in ilCtrl.
ilCtrlInterface::getParentReturn | ( | object | $a_gui_obj | ) |
object | $a_gui_obj |
Implemented in ilCtrl.
ilCtrlInterface::getParentReturnByClass | ( | string | $a_class | ) |
string | $a_class |
Implemented in ilCtrl.
ilCtrlInterface::getRedirectSource | ( | ) |
ilCtrlInterface::insertCtrlCalls | ( | $a_parent, | |
$a_child, | |||
string | $a_comp_prefix | ||
) |
Inserts an ilCtrl call record into the database.
object | string | $a_parent | |
object | string | $a_child | |
string | $a_comp_prefix |
ilCtrlException | due to deprecation. |
Implemented in ilCtrl.
ilCtrlInterface::isAsynch | ( | ) |
ilCtrlInterface::lookupClassPath | ( | string | $a_class | ) |
Get class path that can be used in include statements for a given class name.
string | $a_class |
ilCtrlException | if the class cannot be found. |
Implemented in ilCtrl.
ilCtrlInterface::lookupOriginalClassName | ( | string | $a_class | ) |
This method was introduced due to composer being case-sensitive when autoloading classes.
In some cases, the command class needs to be dynamically instantiated, for which one should use the name with proper capitalization.
Implemented in ilCtrl.
ilCtrlInterface::redirect | ( | object | $a_gui_obj, |
?string | $a_cmd = null , |
||
?string | $a_anchor = null , |
||
bool | $is_async = false |
||
) |
Redirects to another GUI object.
object | $a_gui_obj | |
string | null | $a_cmd | |
string | null | $a_anchor | |
bool | $is_async |
ilCtrlException | if the provided class cannot be found. |
Implemented in ilCtrl.
ilCtrlInterface::redirectByClass | ( | $a_class, | |
?string | $a_cmd = null , |
||
?string | $a_anchor = null , |
||
bool | $is_async = false |
||
) |
Redirects to the provided GUI class.
string|string[] | $a_class | |
string | null | $a_cmd | |
string | null | $a_anchor | |
bool | $is_async |
ilCtrlException | if a provided class cannot be found. |
Implemented in ilCtrl.
ilCtrlInterface::redirectToURL | ( | string | $target_url | ) |
ilCtrlInterface::returnToParent | ( | object | $a_gui_obj, |
?string | $a_anchor = null |
||
) |
Redirects to next parent class set with setReturn().
object | $a_gui_obj | |
string | null | $a_anchor |
ilCtrlException | if the object was not yet provided with a return target. |
Implemented in ilCtrl.
ilCtrlInterface::saveParameter | ( | object | $a_gui_obj, |
$a_parameter | |||
) |
Sets parameters for the given object.
object | $a_gui_obj | |
string|string[] | $a_parameter |
ilCtrlException | if an invalid parameter name is given. |
Implemented in ilCtrl.
ilCtrlInterface::saveParameterByClass | ( | string | $a_class, |
$a_parameter | |||
) |
Sets a parameter for the given GUI class that must be passed in every target link generation.
This means ilCtrl considers these parameters whenever a link-generation method is called afterwards, and uses the currently given value for these parameters for the next URL as well.
Typical examples are ref_id or obj_id, where the constructor of a class can use the statement $ilCtrl->saveParameterByClass(self::class, ['ref_id'])
string | $a_class | |
string|string[] | $a_parameter |
ilCtrlException | if an invalid parameter name is given. |
Implemented in ilCtrl.
ilCtrlInterface::setContextObject | ( | int | $obj_id, |
string | $obj_type | ||
) |
Sets the current object (id and type) of ilCtrl's context.
int | $obj_id | |
string | $obj_type |
Implemented in ilCtrl.
ilCtrlInterface::setParameter | ( | object | $a_gui_obj, |
string | $a_parameter, | ||
$a_value | |||
) |
Sets a parameter for the given GUI object and appends the given value.
object | $a_gui_obj | |
string | $a_parameter | |
mixed | $a_value |
ilCtrlException | if an invalid parameter name is given. |
Implemented in ilCtrl.
ilCtrlInterface::setParameterByClass | ( | string | $a_class, |
string | $a_parameter, | ||
$a_value | |||
) |
Sets a parameter for the given GUI class and appends the given value as well.
unlike
string | $a_class | |
string | $a_parameter | |
mixed | $a_value |
ilCtrlException | if an invalid parameter name is given. |
Implemented in ilCtrl.
Referenced by ilCalendarPresentationGUI\addCategoryTabs(), ilObjWorkspaceRootFolderListGUI\getCommandLink(), ilObjBookingPoolListGUI\getCommandLink(), ilObjLearningModuleListGUI\getCommandLink(), ilObjItemGroupListGUI\getCommandLink(), ilObjSessionListGUI\getCommandLink(), ilObjCategoryReferenceListGUI\getCommandLink(), ilCalendarPresentationGUI\prepareOutput(), and ilCalendarPresentationGUI\showViewSelection().
ilCtrlInterface::setReturn | ( | object | $a_gui_obj, |
?string | $a_cmd = null |
||
) |
Sets the return command of a given GUI object.
object | $a_gui_obj | |
string | null | $a_cmd |
ilCtrlException | if a provided class cannot be found. |
Implemented in ilCtrl.
Referenced by ilMembershipOverviewGUI\executeCommand().
ilCtrlInterface::setReturnByClass | ( | string | $a_class, |
?string | $a_cmd = null |
||
) |
Sets the return command of a given class.
string | $a_class | |
string | null | $a_cmd |
ilCtrlException | if a provided class cannot be found. |
Implemented in ilCtrl.
ilCtrlInterface::setTargetScript | ( | string | $a_target_script | ) |
const ilCtrlInterface::CMD_MODE_ASYNC = 'asynch' |
Definition at line 60 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlContext\adoptRequestParameters(), and ilCtrlContextTest\testContextAsyncPropertyAdoptionByRequest().
const ilCtrlInterface::CMD_MODE_HTML = 'getHtml' |
Definition at line 61 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlContextTest\testContextAsyncPropertyAdoptionByRequest().
const ilCtrlInterface::CMD_MODE_PROCESS = 'execComm' |
different modes used for UI plugins (or in dev-mode).
Definition at line 59 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlContextTest\testContextAsyncPropertyAdoptionByRequest().
const ilCtrlInterface::CMD_POST = 'post' |
Definition at line 32 of file interface.ilCtrlInterface.php.
const ilCtrlInterface::PARAM_BASE_CLASS = 'baseClass' |
Definition at line 40 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlContext\adoptRequestParameters(), ilCtrlContextTest\testContextBaseClassPropertyAdoptionByRequest(), and ilCtrlContextTest\testContextPropertyAdoptionByRequest().
const ilCtrlInterface::PARAM_CID_PATH = 'cmdNode' |
Definition at line 38 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlContext\adoptRequestParameters(), and ilCtrlContextTest\testContextPropertyAdoptionByRequest().
const ilCtrlInterface::PARAM_CMD = 'cmd' |
Definition at line 44 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlContext\adoptRequestParameters(), and ilCtrlContextTest\testContextPropertyAdoptionByRequest().
const ilCtrlInterface::PARAM_CMD_CLASS = 'cmdClass' |
Definition at line 41 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlContext\adoptRequestParameters(), ilMMSubItemGUI\executeCommand(), ilCtrlContextTest\testContextCommandClassPropertyWithBaseClass(), ilCtrlContextTest\testContextCommandClassPropertyWithoutBaseClass(), and ilCtrlContextTest\testContextPropertyAdoptionByRequest().
const ilCtrlInterface::PARAM_CMD_FALLBACK = 'fallbackCmd' |
Definition at line 43 of file interface.ilCtrlInterface.php.
const ilCtrlInterface::PARAM_CMD_MODE = 'cmdMode' |
Definition at line 42 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlContext\adoptRequestParameters(), ilCtrlContextTest\testContextAsyncPropertyAdoptionByRequest(), and ilCtrlContextTest\testContextPropertyAdoptionByRequest().
const ilCtrlInterface::PARAM_CSRF_TOKEN = 'rtoken' |
$_GET request parameter names, used throughout ilCtrl.
Definition at line 37 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlTokenRepository\fetchToken(), and ilCtrlTokenRepository\storeToken().
const ilCtrlInterface::PARAM_REDIRECT = 'redirectSource' |
Definition at line 39 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlContext\adoptRequestParameters(), and ilCtrlContextTest\testContextPropertyAdoptionByRequest().
const ilCtrlInterface::PROTECTED_PARAMETERS |
Definition at line 49 of file interface.ilCtrlInterface.php.
Referenced by ilCtrlStructure\setPermanentParameterByClass().