ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCtrl Class Reference

Class ilCtrl provides processing control methods. More...

+ Inheritance diagram for ilCtrl:
+ Collaboration diagram for ilCtrl:

Public Member Functions

 __construct (protected ilCtrlStructureInterface $structure, protected ilCtrlTokenRepositoryInterface $token_repository, protected ilCtrlPathFactoryInterface $path_factory, protected ilCtrlContextInterface $context, protected ResponseSenderStrategy $response_sender, protected ServerRequestInterface $server_request, protected RequestWrapper $post_parameters, protected RequestWrapper $get_parameters, protected Refinery $refinery, protected ilComponentFactory $component_factory, protected ilCtrlSubject $subject, protected ilCtrlQueryParserInterface $query_parser,)
 
 __clone ()
 
 callBaseClass (?string $a_base_class=null)
 @inheritDoc More...
 
 forwardCommand (object $a_gui_object)
 @inheritDoc More...
 
 getHTML (object $a_gui_object, ?array $a_parameters=null)
 @inheritDoc More...
 
 getCmd (?string $fallback_command=null)
 @inheritDoc More...
 
 getCmdClass ()
 @inheritDoc More...
 
 getNextClass ($a_gui_class=null)
 @inheritDoc More...
 
 saveParameter (object $a_gui_obj, $a_parameter)
 @inheritDoc More...
 
 saveParameterByClass (string $a_class, $a_parameter)
 @inheritDoc More...
 
 setParameter (object $a_gui_obj, string $a_parameter, $a_value)
 @inheritDoc More...
 
 setParameterByClass (string $a_class, string $a_parameter, $a_value)
 @inheritDoc More...
 
 getParameterArray (object $a_gui_obj)
 @inheritDoc More...
 
 getParameterArrayByClass (string $a_class)
 @inheritDoc More...
 
 clearParameters (object $a_gui_obj)
 @inheritDoc More...
 
 clearParametersByClass (string $a_class)
 @inheritDoc More...
 
 clearParameterByClass (string $a_class, string $a_parameter)
 @inheritDoc More...
 
 getLinkTarget (object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 @inheritDoc More...
 
 getLinkTargetByClass ( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 @inheritDoc More...
 
 getFormAction (object $a_gui_obj, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 @inheritDoc More...
 
 getFormActionByClass ( $a_class, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 @inheritDoc More...
 
 redirect (object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
 @inheritDoc More...
 
 redirectByClass ( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
 @inheritDoc More...
 
 redirectToURL (string $target_url)
 @inheritDoc More...
 
 setContextObject (int $obj_id, string $obj_type)
 @inheritDoc More...
 
 getContextObjId ()
 @inheritDoc More...
 
 getContextObjType ()
 @inheritDoc More...
 
 getCallHistory ()
 @inheritDoc More...
 
 lookupClassPath (string $a_class)
 @inheritDoc More...
 
 lookupOriginalClassName (string $a_class)
 @inheritDoc More...
 
 getClassForClasspath (string $a_class_path)
 @inheritDoc More...
 
 setTargetScript (string $a_target_script)
 @inheritDoc More...
 
 isAsynch ()
 @inheritDoc More...
 
 setReturn (object $a_gui_obj, ?string $a_cmd=null)
 @inheritDoc More...
 
 setReturnByClass (string $a_class, ?string $a_cmd=null)
 @inheritDoc More...
 
 returnToParent (object $a_gui_obj, ?string $a_anchor=null)
 @inheritDoc More...
 
 getParentReturn (object $a_gui_obj)
 @inheritDoc More...
 
 getParentReturnByClass (string $a_class)
 @inheritDoc More...
 
 getRedirectSource ()
 @inheritDoc More...
 
 insertCtrlCalls ($a_parent, $a_child, string $a_comp_prefix)
 @inheritDoc More...
 
 checkCurrentPathForClass (string $gui_class)
 @inheritDoc More...
 
 getCurrentClassPath ()
 @inheritDoc More...
 
 attachObserver (ilCtrlObserver $observer, ilCtrlEvent $event=ilCtrlEvent::ALL)
 @inheritDoc More...
 
 detachObserver (ilCtrlObserver $observer, ilCtrlEvent $event=ilCtrlEvent::ALL)
 @inheritDoc More...
 
 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...
 

Protected Member Functions

 getDeterminedCommand ()
 

Protected Attributes

object $exec_object = null
 
string $command = null
 
array $stacktrace = []
 

Private Member Functions

 getQueryParam (string $parameter_name)
 Returns a parameter with the given name from the current GET request. More...
 
 getTableCommand ()
 
 getPostCommand ()
 Returns the current $_POST command. More...
 
 getTargetUrl ( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $is_escaped=false, bool $is_post=false)
 Helper function that returns a target URL string. More...
 
 isCmdSecure (bool $is_post, string $cmd_class, ?string $cmd=null)
 Returns whether a given command is considered safe or not. More...
 
 appendParameterStringsByClass (string $class_name, string $target_url, bool $is_escaped=false)
 Appends all parameters for a given class to the given URL. More...
 
 populateCall (string $class_name, string $cmd_mode)
 Helper function that populates a call in the current stacktrace. More...
 
 getClassByObject ($object)
 Helper function that returns the class name of a mixed (object or string) parameter. More...
 

Additional Inherited Members

- Data Fields inherited from ilCtrlInterface
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'
 

Detailed Description

Class ilCtrl provides processing control methods.

A global instance is available through $DIC->ctrl() or $ilCtrl.

Author
Thibeau Fuhrer thf@s.nosp@m.tude.nosp@m.r.rai.nosp@m.mann.nosp@m..ch @noinspection AutoloadingIssuesInspection

Definition at line 35 of file class.ilCtrl.php.

Constructor & Destructor Documentation

◆ __construct()

ilCtrl::__construct ( protected ilCtrlStructureInterface  $structure,
protected ilCtrlTokenRepositoryInterface  $token_repository,
protected ilCtrlPathFactoryInterface  $path_factory,
protected ilCtrlContextInterface  $context,
protected ResponseSenderStrategy  $response_sender,
protected ServerRequestInterface  $server_request,
protected RequestWrapper  $post_parameters,
protected RequestWrapper  $get_parameters,
protected Refinery  $refinery,
protected ilComponentFactory  $component_factory,
protected ilCtrlSubject  $subject,
protected ilCtrlQueryParserInterface  $query_parser 
)

Definition at line 47 of file class.ilCtrl.php.

60 {
61 }

Member Function Documentation

◆ __clone()

ilCtrl::__clone ( )

Definition at line 63 of file class.ilCtrl.php.

64 {
65 $this->structure = clone $this->structure;
66 }
$structure
TOTAL STRUCTURE.

References $structure.

◆ appendParameterStringsByClass()

ilCtrl::appendParameterStringsByClass ( string  $class_name,
string  $target_url,
bool  $is_escaped = false 
)
private

Appends all parameters for a given class to the given URL.

Parameters
string$class_name
string$target_url
bool$is_escaped
Returns
string
Exceptions
ilCtrlException

Definition at line 1050 of file class.ilCtrl.php.

1054 : string {
1055 $class_parameters = $this->getParameterArrayByClass($class_name);
1056 if (!empty($class_parameters)) {
1057 foreach ($class_parameters as $key => $value) {
1058 $target_url = $this->appendParameterString(
1059 $target_url,
1060 $key,
1061 $value,
1062 $is_escaped
1063 );
1064 }
1065 }
1066
1067 return $target_url;
1068 }
getParameterArrayByClass(string $a_class)
@inheritDoc

◆ attachObserver()

ilCtrl::attachObserver ( ilCtrlObserver  $observer,
ilCtrlEvent  $event = ilCtrlEvent::ALL 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 700 of file class.ilCtrl.php.

700 : void
701 {
702 $this->subject->attach($observer, $event);
703 }

◆ callBaseClass()

ilCtrl::callBaseClass ( ?string  $a_base_class = null)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 71 of file class.ilCtrl.php.

71 : void
72 {
73 // prioritise the context's baseclass over the given one.
74 $a_base_class = $this->context->getBaseClass() ?? $a_base_class;
75
76 // abort if no baseclass was provided.
77 if (null === $a_base_class) {
78 throw new ilCtrlException(__METHOD__ . " was not given a baseclass and the request doesn't include one either.");
79 }
80
81 // abort if the provided baseclass is unknown.
82 if (!$this->structure->isBaseClass($a_base_class)) {
83 throw new ilCtrlException("Provided class '$a_base_class' is not a baseclass");
84 }
85
86 // in case the baseclass was given by argument,
87 // set the context's baseclass.
88 $this->context->setBaseClass($a_base_class);
89
90 // no null-check needed as previous isBaseClass() was true.
91 $obj_name = $this->structure->getObjNameByName($a_base_class);
92 $this->forwardCommand(new $obj_name());
93 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
forwardCommand(object $a_gui_object)
@inheritDoc

References forwardCommand().

+ Here is the call graph for this function:

◆ checkCurrentPathForClass()

ilCtrl::checkCurrentPathForClass ( string  $gui_class)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 667 of file class.ilCtrl.php.

667 : bool
668 {
669 $class_cid = $this->structure->getClassCidByName($gui_class);
670 if (null === $class_cid) {
671 return false;
672 }
673
674 return strpos(
675 $this->context->getPath()->getCidPath() ?? '',
676 $class_cid
677 ) !== false;
678 }

◆ clearParameterByClass()

ilCtrl::clearParameterByClass ( string  $a_class,
string  $a_parameter 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 308 of file class.ilCtrl.php.

308 : void
309 {
310 $this->structure->removeSingleParameterByClass($a_class, $a_parameter);
311 }

Referenced by ILIAS\User\StaticURLHandler\buildChangeEmailUrl(), and ILIAS\Test\StaticURLHandler\buildQuestionURL().

+ Here is the caller graph for this function:

◆ clearParameters()

ilCtrl::clearParameters ( object  $a_gui_obj)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 289 of file class.ilCtrl.php.

289 : void
290 {
291 $this->clearParametersByClass($this->getClassByObject($a_gui_obj));
292 }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
clearParametersByClass(string $a_class)
@inheritDoc

References clearParametersByClass(), and getClassByObject().

+ Here is the call graph for this function:

◆ clearParametersByClass()

ilCtrl::clearParametersByClass ( string  $a_class)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 297 of file class.ilCtrl.php.

297 : void
298 {
299 // apparently permanent parameters should not be removable,
300 // therefore the line below stays commented:
301 // $this->structure->removePermanentParametersByClass($a_class);
302 $this->structure->removeTemporaryParametersByClass($a_class);
303 }

Referenced by clearParameters(), and ilExAssignmentInfo\getInstructionFileInfo().

+ Here is the caller graph for this function:

◆ detachObserver()

ilCtrl::detachObserver ( ilCtrlObserver  $observer,
ilCtrlEvent  $event = ilCtrlEvent::ALL 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 708 of file class.ilCtrl.php.

708 : void
709 {
710 $this->subject->detach($observer, $event);
711 }

◆ forwardCommand()

ilCtrl::forwardCommand ( object  $a_gui_object)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 98 of file class.ilCtrl.php.

99 {
100 $class_name = get_class($a_gui_object);
101
102 // @TODO: remove this check once an interface for command classes exists.
103 if (!method_exists($a_gui_object, 'executeCommand')) {
104 throw new ilCtrlException("$class_name doesn't implement executeCommand().");
105 }
106
107 $this->exec_object = $a_gui_object;
108 $this->populateCall($class_name, self::CMD_MODE_PROCESS);
109
110 // with forward command we cannot progress, or set
111 // the current command class. Otherwise, the path-
112 // finding gets mixed up, as it can only be used in
113 // getHTML() method calls.
114 $this->context
115 ->setCmdMode(self::CMD_MODE_PROCESS);
116
117 $this->subject->notify(ilCtrlEvent::COMMAND_CLASS_FORWARD, $class_name);
118
119 return $a_gui_object->executeCommand();
120 }
populateCall(string $class_name, string $cmd_mode)
Helper function that populates a call in the current stacktrace.

References populateCall().

Referenced by callBaseClass(), ilBookingGatewayGUI\executeCommand(), ilContainerSkillGUI\executeCommand(), ilContSkillPresentationGUI\executeCommand(), ilAchievementsGUI\executeCommand(), ilGroupUserActionsGUI\executeCommand(), ilObjLearningHistorySettingsGUI\executeCommand(), ilLTIRouterGUI\executeCommand(), McstPodcastGUI\executeCommand(), ilMediaCreationGUI\executeCommand(), ilNewsTimelineGUI\executeCommand(), ilObjCommentsSettingsGUI\executeCommand(), ilObjNotesSettingsGUI\executeCommand(), ilObjPersonalWorkspaceSettingsGUI\executeCommand(), ilPortfolioRoleAssignmentGUI\executeCommand(), ilSkillTreeAdminGUI\executeCommand(), and ilObjStyleSheetGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCallHistory()

ilCtrl::getCallHistory ( )

@inheritDoc

Implements ilCtrlInterface.

Definition at line 524 of file class.ilCtrl.php.

524 : array
525 {
526 return $this->stacktrace;
527 }
array $stacktrace

◆ getClassByObject()

ilCtrl::getClassByObject (   $object)
private

Helper function that returns the class name of a mixed (object or string) parameter.

Parameters
object | string$object
Returns
string

Definition at line 1135 of file class.ilCtrl.php.

1135 : string
1136 {
1137 return (is_object($object)) ? get_class($object) : $object;
1138 }

Referenced by clearParameters(), getNextClass(), getParameterArray(), saveParameter(), and setParameter().

+ Here is the caller graph for this function:

◆ getClassForClasspath()

ilCtrl::getClassForClasspath ( string  $a_class_path)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 553 of file class.ilCtrl.php.

553 : string
554 {
555 $path_info = pathinfo($a_class_path);
556
557 return substr($path_info['basename'], 6, -4);
558 }

◆ getCmd()

ilCtrl::getCmd ( ?string  $fallback_command = null)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 158 of file class.ilCtrl.php.

158 : ?string
159 {
160 $command = $this->getDeterminedCommand() ?? $fallback_command;
161 if (null !== $this->command && $command === $this->command) {
162 // don't broadcast command determination event on consecutive
163 // method calls.
164 return $command;
165 }
166
167 $this->subject->notify(ilCtrlEvent::COMMAND_DETERMINATION, $command);
168 $this->command = $command;
169
170 return $command ?? ''; // remove null-coalesce
171 }
string $command
getDeterminedCommand()

References $command, and getDeterminedCommand().

Referenced by ilAccordionPropertiesStorageGUI\executeCommand(), ilSessionStatisticsGUI\executeCommand(), ilBookingProcessWithoutScheduleGUI\executeCommand(), ilBookingProcessWithScheduleGUI\executeCommand(), ilBookingGatewayGUI\executeCommand(), ilBookingPreferencesGUI\executeCommand(), ilBookingReservationsGUI\executeCommand(), ilClassificationBlockGUI\executeCommand(), ilContainerBlockPropertiesStorageGUI\executeCommand(), ilContainerFilterAdminGUI\executeCommand(), ilPageEditorServerAdapterGUI\executeCommand(), ilIIMEditorServerAdapterGUI\executeCommand(), ilPCQuestionGUI\executeCommand(), ilAchievementsGUI\executeCommand(), ilAssignmentPresentationGUI\executeCommand(), ilExcRandomAssignmentGUI\executeCommand(), ilExAssTypeWikiTeamGUI\executeCommand(), ilGroupAddToGroupActionGUI\executeCommand(), ilGroupUserActionsGUI\executeCommand(), ilObjLearningHistorySettingsGUI\executeCommand(), ilLearningHistoryGUI\executeCommand(), ilLMImportGUI\executeCommand(), McstImageGalleryGUI\executeCommand(), McstPodcastGUI\executeCommand(), ilMediaCreationGUI\executeCommand(), ilMediaPoolImportGUI\executeCommand(), ilObjCommentsSettingsGUI\executeCommand(), ilObjNotesSettingsGUI\executeCommand(), ilObjNotificationSettingsGUI\executeCommand(), ilObjPersonalWorkspaceSettingsGUI\executeCommand(), ilPortfolioRoleAssignmentGUI\executeCommand(), ilRecommendedContentRoleConfigGUI\executeCommand(), ilSkillTreeAdminGUI\executeCommand(), ilObjStyleSheetGUI\executeCommand(), ilSurveyConstraintsGUI\executeCommand(), ilSurveyRaterGUI\executeCommand(), ilSurveySkillDeterminationGUI\executeCommand(), ilSurveySkillGUI\executeCommand(), ilSurveySkillThresholdsGUI\executeCommand(), ilTablePropertiesStorageGUI\executeCommand(), ilTaggingSlateContentGUI\executeCommand(), ilPDTasksBlockGUI\executeCommand(), ilDerivedTasksGUI\executeCommand(), and ilTaxonomySettingsGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCmdClass()

ilCtrl::getCmdClass ( )

@inheritDoc

Implements ilCtrlInterface.

Definition at line 176 of file class.ilCtrl.php.

176 : ?string
177 {
178 if (null !== ($cmd_class = $this->context->getCmdClass())) {
179 return strtolower($this->structure->getObjNameByName($cmd_class));
180 }
181
182 return '';
183 }

◆ getContextObjId()

ilCtrl::getContextObjId ( )

@inheritDoc

Implements ilCtrlInterface.

Definition at line 508 of file class.ilCtrl.php.

508 : ?int
509 {
510 return $this->context->getObjId();
511 }

◆ getContextObjType()

ilCtrl::getContextObjType ( )

@inheritDoc

Implements ilCtrlInterface.

Definition at line 516 of file class.ilCtrl.php.

516 : ?string
517 {
518 return $this->context->getObjType();
519 }

◆ getCurrentClassPath()

ilCtrl::getCurrentClassPath ( )

@inheritDoc

Implements ilCtrlInterface.

Definition at line 683 of file class.ilCtrl.php.

683 : array
684 {
685 if (null === $this->context->getPath()->getCidPath()) {
686 return [];
687 }
688
689 $class_paths = [];
690 foreach ($this->context->getPath()->getCidArray(SORT_ASC) as $cid) {
691 $class_paths[] = $this->structure->getObjNameByCid($cid);
692 }
693
694 return $class_paths;
695 }

◆ getDeterminedCommand()

ilCtrl::getDeterminedCommand ( )
protected

Definition at line 713 of file class.ilCtrl.php.

713 : ?string
714 {
715 // retrieve $_GET and $_POST parameters.
716 $post_command = $this->getPostCommand();
717 $get_command = $this->getQueryParam(self::PARAM_CMD);
718 $table_command = $this->getTableCommand();
719
720 $is_post = (self::CMD_POST === $get_command);
721
722 // if the $_GET command is 'post', either the $_POST
723 // command or $_GETs fallback command is used.
724 // for now, the table command is used as fallback as well,
725 // but this will be removed once the implementation of
726 // table actions change.
727 $command = ($is_post) ?
728 $post_command ?? $table_command ?? $this->getQueryParam(self::PARAM_CMD_FALLBACK) :
729 $get_command;
730
731 // override the command that has been set during a
732 // request via ilCtrl::setCmd().
733 $context_command = $this->context->getCmd();
734 if (null !== $context_command && self::CMD_POST !== $context_command) {
735 $command = $context_command;
736 }
737
738 if (null === $command) {
739 return $command;
740 }
741
742 // if the command is for post requests, or the command
743 // is not considered safe, the csrf-validation must pass.
744 $cmd_class = $this->context->getCmdClass();
745 if (null !== $cmd_class && !$this->isCmdSecure($is_post, $cmd_class, $command)) {
746 $stored_token = $this->token_repository->getToken();
747 $sent_token = $this->getQueryParam(self::PARAM_CSRF_TOKEN);
748
749 if (null !== $sent_token && $stored_token->verifyWith($sent_token)) {
750 return $command;
751 }
752 return null;
753 }
754
755 return $command;
756 }
getPostCommand()
Returns the current $_POST command.
getTableCommand()
getQueryParam(string $parameter_name)
Returns a parameter with the given name from the current GET request.
isCmdSecure(bool $is_post, string $cmd_class, ?string $cmd=null)
Returns whether a given command is considered safe or not.

Referenced by getCmd().

+ Here is the caller graph for this function:

◆ getFormAction()

ilCtrl::getFormAction ( object  $a_gui_obj,
?string  $a_fallback_cmd = null,
?string  $a_anchor = null,
bool  $is_async = false,
bool  $has_xml_style = false 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 354 of file class.ilCtrl.php.

360 : string {
361 return $this->getFormActionByClass(
362 $this->getClassByObject($a_gui_obj),
363 $a_fallback_cmd,
364 $a_anchor,
365 $is_async,
366 $has_xml_style
367 );
368 }
getFormActionByClass( $a_class, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc

Referenced by ilBookingBulkCreationTableGUI\__construct(), ILIAS\Style\Content\CharacteristicTableGUI\__construct(), ilFeedbackConfirmationTable2GUI\__construct(), ilExAssignmentTeamLogTableGUI\__construct(), ilParticipantsPerAssignmentTableGUI\__construct(), ilPortfolioRoleAssignmentGUI\confirmAssignmentDeletion(), ilContSkillAdminGUI\confirmDeleteSingleLocalProfile(), ilContSkillAdminGUI\confirmRemoveSelectedGlobalProfiles(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilContSkillAdminGUI\confirmRemoveSingleGlobalProfile(), ilSessionStatisticsGUI\current(), ilContSkillAdminGUI\deassignCompetencesConfirm(), ilMediaCreationGUI\editTitlesAndDescriptions(), ilExSubmissionTeamGUI\getAdoptForm(), ilObjStyleSheetGUI\getCloneForm(), ilObjStyleSheetGUI\getCreateForm(), ilSurveyEvaluationGUI\getExportModal(), McstImageGalleryGUI\getHTML(), ilObjStyleSheetGUI\getImportForm(), ilPCAMDFormGUI\getPortfolioForm(), ilPortfolioRoleAssignmentGUI\initAssignmentForm(), ilObjNotificationSettingsGUI\initForm(), ILIAS\Chatroom\BuildChat\initialData(), ilMediaCreationGUI\initPoolSelection(), ilBookingGatewayGUI\initSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilHistoryTableGUI\initTable(), ilMediaCreationGUI\initUrlForm(), ilContSkillAdminGUI\listProfiles(), ilSessionStatisticsGUI\long(), ilSessionStatisticsGUI\periodic(), ilSessionStatisticsGUI\renderCurrentBasics(), ilSessionStatisticsGUI\short(), and ilChatroomViewGUI\showNameSelection().

+ Here is the caller graph for this function:

◆ getFormActionByClass()

ilCtrl::getFormActionByClass (   $a_class,
?string  $a_fallback_cmd = null,
?string  $a_anchor = null,
bool  $is_async = false,
bool  $has_xml_style = false 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 373 of file class.ilCtrl.php.

379 : string {
380 return $this->getTargetUrl(
381 $a_class,
382 $a_fallback_cmd,
383 $a_anchor,
384 $is_async,
385 $has_xml_style,
386 true
387 ) ?? '';
388 }
getTargetUrl( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $is_escaped=false, bool $is_post=false)
Helper function that returns a target URL string.

Referenced by ilPortfolioPageGUI\getCourseSortAction(), and ilPortfolioTemplatePageGUI\getCourseSortAction().

+ Here is the caller graph for this function:

◆ getHTML()

ilCtrl::getHTML ( object  $a_gui_object,
?array  $a_parameters = null 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 125 of file class.ilCtrl.php.

125 : string
126 {
127 $class_name = get_class($a_gui_object);
128
129 // @TODO: remove this check once an interface for command classes exists.
130 if (!method_exists($a_gui_object, 'getHTML')) {
131 throw new ilCtrlException("$class_name doesn't implement getHTML().");
132 }
133
134 $isolatad_structure = $this->structure;
135 $isolated_context = $this->context;
136 $isolated_object = $this->exec_object;
137
138 $this->exec_object = $a_gui_object;
139 $this->populateCall($class_name, self::CMD_MODE_HTML);
140 $this->context
141 ->setCmdClass($class_name)
142 ->setCmdMode(self::CMD_MODE_HTML);
143
144 $html = (null !== $a_parameters) ?
145 $a_gui_object->getHTML($a_parameters) :
146 $a_gui_object->getHTML();
147
148 $this->structure = $isolatad_structure;
149 $this->context = $isolated_context;
150 $this->exec_object = $isolated_object;
151
152 return $html;
153 }
object $exec_object
$context
Definition: webdav.php:31

References $context, $exec_object, $structure, and populateCall().

+ Here is the call graph for this function:

◆ getLinkTarget()

ilCtrl::getLinkTarget ( object  $a_gui_obj,
?string  $a_cmd = null,
?string  $a_anchor = null,
bool  $is_async = false,
bool  $has_xml_style = false 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 316 of file class.ilCtrl.php.

322 : string {
323 return $this->getLinkTargetByClass(
324 $this->getClassByObject($a_gui_obj),
325 $a_cmd,
326 $a_anchor,
327 $is_async,
328 $has_xml_style
329 );
330 }
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc

Referenced by ilObjWorkspaceFolderGUI\addContentSubTabs(), ilTaxMDGUI\addSubTab(), ILIAS\COPage\Page\PageQueryActionHandler\allCommand(), ILIAS\BookingManager\BookingProcess\ProcessUtilGUI\assignParticipants(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilLMPageObjectGUI\create(), ilCopySelfAssQuestionTableGUI\fillRow(), ILIAS\COPage\Page\PageQueryActionHandler\getActionsDropDown(), ilObjLearningHistorySettingsGUI\getAdminTabs(), ilObjCommentsSettingsGUI\getAdminTabs(), ilObjNotesSettingsGUI\getAdminTabs(), ilObjPersonalWorkspaceSettingsGUI\getAdminTabs(), ilContainerFilterAdminGUI\getFieldSelectionForm(), ilNoteGUI\getGlyph(), ilLikeGUI\getHTML(), ILIAS\COPage\Page\PageQueryActionHandler\getMultiLangActions(), ilNoteGUI\getNumber(), ilPCAMDFormGUI\getTemplateForm(), ILIAS\COPage\Page\PageQueryActionHandler\getTopActions(), ilNoteGUI\getTriggerShyButton(), ilNoteGUI\getWidget(), ILIAS\COPage\PC\InteractiveImage\InteractiveImageQueryActionHandler\init(), ilObjPortfolioAdministrationGUI\initAuthorshipForm(), ilObjLearningHistorySettingsGUI\initForm(), ilObjCommentsSettingsGUI\initForm(), ilObjNotesSettingsGUI\initForm(), ilObjBookingPoolGUI\initHeaderAction(), ILIAS\Chatroom\BuildChat\initialData(), ilLMPageObjectGUI\initNewPageForm(), ilBookingPreferencesGUI\initPreferenceForm(), ilObjSkillTreeGUI\initTreeForm(), ilContSkillAdminGUI\listCompetences(), ilRecommendedContentRoleConfigGUI\listItems(), ilMediaCreationGUI\listPoolItems(), ilLearningHistoryGUI\renderButton(), ilTaggingSlateContentGUI\renderResourcesForTag(), ilObjDashboardSettingsGUI\setSettingsSubTabs(), ilPDNotesGUI\setToolbar(), ilGroupAddToGroupActionGUI\show(), ilSkillRootGUI\showImportForm(), ilSkillProfileGUI\showLevelsWithLocalContext(), and ILIAS\Chatroom\BuildChat\template().

+ Here is the caller graph for this function:

◆ getLinkTargetByClass()

ilCtrl::getLinkTargetByClass (   $a_class,
?string  $a_cmd = null,
?string  $a_anchor = null,
bool  $is_async = false,
bool  $has_xml_style = false 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 335 of file class.ilCtrl.php.

341 : string {
342 return $this->getTargetUrl(
343 $a_class,
344 $a_cmd,
345 $a_anchor,
346 $is_async,
347 $has_xml_style
348 ) ?? '';
349 }

Referenced by ilBlockGUI\addRepoCommands(), ilContainerSkillGUI\addTabs(), ILIAS\User\StaticURLHandler\buildChangeEmailUrl(), ILIAS\Test\StaticURLHandler\buildQuestionURL(), ilExAssTypeUploadGUI\buildSubmissionPropertiesAndActions(), ilExAssTypeWikiTeamGUI\buildSubmissionPropertiesAndActions(), ilSkillProfileGUI\createLocal(), ilBookingParticipantsTableGUI\fillRow(), ilHistoryTableGUI\fillRow(), ILIAS\COPage\Page\PageQueryActionHandler\getActionsDropDown(), ilContainerPageGUI\getAdditionalPageActions(), ilObjLearningHistorySettingsGUI\getAdminTabs(), ilObjCommentsSettingsGUI\getAdminTabs(), ilObjNotesSettingsGUI\getAdminTabs(), ilObjPersonalWorkspaceSettingsGUI\getAdminTabs(), ilNoteGUI\getButton(), ilAccessibilitySupportContactsGUI\getFooterLink(), McstImageGalleryGUI\getHTML(), McstPodcastGUI\getHTML(), ilSurveyContainsDataMessageBoxGUI\getHTML(), ilExAssignmentInfo\getInstructionFileInfo(), ilAchievementsGUI\getLinks(), ilNoteGUI\getShyButton(), ilBookingPreferencesGUI\listBookingResults(), ilContSkillAdminGUI\listProfiles(), ilSkillTreeAdminGUI\listTrees(), ilExAssTypeWikiTeamGUI\renderOverviewContent(), ilBookingGatewayGUI\setSubTabs(), ilPDNotesGUI\setToolbar(), ilSkillProfileGUI\showLevelsWithLocalContext(), and ilChatroomViewGUI\showRoom().

+ Here is the caller graph for this function:

◆ getNextClass()

ilCtrl::getNextClass (   $a_gui_class = null)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 188 of file class.ilCtrl.php.

188 : ?string
189 {
190 if (null === $a_gui_class && null === $this->exec_object) {
191 return '';
192 }
193
194 if (null === $this->context->getPath()) {
195 return '';
196 }
197
198 $next_cid = $this->context->getPath()->getNextCid(
199 $this->getClassByObject($a_gui_class ?? $this->exec_object)
200 );
201
202 if (null !== $next_cid) {
203 return strtolower($this->structure->getObjNameByCid($next_cid) ?? '');
204 }
205
206 return '';
207 }

References getClassByObject().

Referenced by ilSessionStatisticsGUI\executeCommand(), ilBadgeManagementGUI\executeCommand(), ilBookingProcessWithoutScheduleGUI\executeCommand(), ilBookingProcessWithScheduleGUI\executeCommand(), ilBookingGatewayGUI\executeCommand(), ilBookingParticipantGUI\executeCommand(), ilBookingPreferencesGUI\executeCommand(), ilBookingReservationsGUI\executeCommand(), ilBookingScheduleGUI\executeCommand(), ilContainerFilterAdminGUI\executeCommand(), ilPageMultiLangGUI\executeCommand(), ilPageEditorServerAdapterGUI\executeCommand(), ilIIMEditorServerAdapterGUI\executeCommand(), ilAchievementsGUI\executeCommand(), ilAssignmentPresentationGUI\executeCommand(), ilExcRandomAssignmentGUI\executeCommand(), ilExAssTypeWikiTeamGUI\executeCommand(), ilExcCriteriaGUI\executeCommand(), ilExSubmissionGUI\executeCommand(), ilExSubmissionTeamGUI\executeCommand(), ilExSubmissionTextGUI\executeCommand(), ilFormPropertyDispatchGUI\executeCommand(), ilPropertyFormGUI\executeCommand(), ilGroupAddToGroupActionGUI\executeCommand(), ilGroupUserActionsGUI\executeCommand(), ilObjLearningHistorySettingsGUI\executeCommand(), ilLearningHistoryGUI\executeCommand(), ilLTIRouterGUI\executeCommand(), McstImageGalleryGUI\executeCommand(), McstPodcastGUI\executeCommand(), ilMediaCreationGUI\executeCommand(), ilImageMapEditorGUI\executeCommand(), ilNewsForContextBlockGUI\executeCommand(), ilPDNewsBlockGUI\executeCommand(), ilObjCommentsSettingsGUI\executeCommand(), ilObjNotesSettingsGUI\executeCommand(), ilObjNotificationSettingsGUI\executeCommand(), ilObjPersonalWorkspaceSettingsGUI\executeCommand(), ilPortfolioRoleAssignmentGUI\executeCommand(), ilRatingCategoryGUI\executeCommand(), ilRatingGUI\executeCommand(), ilObjPluginDispatchGUI\executeCommand(), ilRecommendedContentRoleConfigGUI\executeCommand(), ilObjSCORM2004LearningModuleGUI\executeCommand(), ilRepositoryObjectSearchBlockGUI\executeCommand(), ilSkillTreeAdminGUI\executeCommand(), ilObjStyleSheetGUI\executeCommand(), ilSurveyRaterGUI\executeCommand(), ilTaggingGUI\executeCommand(), ilTaggingSlateContentGUI\executeCommand(), ilDerivedTasksGUI\executeCommand(), ilTaxonomySettingsGUI\executeCommand(), ilWikiFunctionsBlockGUI\executeCommand(), ilWikiImportantPagesBlockGUI\executeCommand(), and ilWikiStatGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getParameterArray()

ilCtrl::getParameterArray ( object  $a_gui_obj)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 252 of file class.ilCtrl.php.

252 : array
253 {
254 return $this->getParameterArrayByClass($this->getClassByObject($a_gui_obj));
255 }

References getClassByObject(), and getParameterArrayByClass().

+ Here is the call graph for this function:

◆ getParameterArrayByClass()

ilCtrl::getParameterArrayByClass ( string  $a_class)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 260 of file class.ilCtrl.php.

260 : array
261 {
262 if (null === $this->structure->getClassCidByName($a_class)) {
263 throw new ilCtrlException("Cannot find provided class '$a_class' in the control structure.");
264 }
265
266 $parameters = [];
267 $permanent_parameters = $this->structure->getPermanentParametersByClass($a_class);
268 if (null !== $permanent_parameters) {
269 foreach ($permanent_parameters as $parameter) {
270 $parameters[$parameter] = $this->getQueryParam($parameter);
271 }
272 }
273
274 $temporary_parameters = $this->structure->getTemporaryParametersByClass($a_class);
275 if (null !== $temporary_parameters) {
276 // override existing ones, as temporary parameters
277 // are prioritised over fetched ones.
278 foreach ($temporary_parameters as $key => $value) {
279 $parameters[$key] = $value;
280 }
281 }
282
283 return $parameters;
284 }

References getQueryParam().

Referenced by getParameterArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getParentReturn()

ilCtrl::getParentReturn ( object  $a_gui_obj)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 624 of file class.ilCtrl.php.

624 : ?string
625 {
626 return $this->getParentReturnByClass($this->getClassByObject($a_gui_obj));
627 }
getParentReturnByClass(string $a_class)
@inheritDoc

Referenced by ilPageContentGUI\getParentReturn().

+ Here is the caller graph for this function:

◆ getParentReturnByClass()

ilCtrl::getParentReturnByClass ( string  $a_class)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 632 of file class.ilCtrl.php.

632 : ?string
633 {
634 $path = $this->path_factory->find($this->context, $a_class);
635 if (null !== $path->getCidPath()) {
636 foreach ($path->getCidArray() as $cid) {
637 $current_class = $this->structure->getClassNameByCid($cid);
638 $return_target = $this->structure->getReturnTargetByClass($current_class);
639 if (null !== $return_target) {
640 return $return_target;
641 }
642 }
643 }
644
645 return null;
646 }
$path
Definition: ltiservices.php:30

References $path.

◆ getPostCommand()

ilCtrl::getPostCommand ( )
private

Returns the current $_POST command.

Returns
string|null

Definition at line 809 of file class.ilCtrl.php.

809 : ?string
810 {
811 if ($this->post_parameters->has(self::PARAM_CMD)) {
812 return $this->post_parameters->retrieve(
813 self::PARAM_CMD,
814 $this->refinery->custom()->transformation(
815 static function ($value): ?string {
816 if (!empty($value)) {
817 if (is_array($value)) {
818 // this most likely only works by accident, but
819 // the selected or clicked command button will
820 // always be sent as first array entry. This
821 // should definitely be done differently.
822 return (string) array_key_first($value);
823 }
824
825 return (string) $value;
826 }
827
828 return null;
829 }
830 )
831 );
832 }
833
834 return null;
835 }

References ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ getQueryParam()

ilCtrl::getQueryParam ( string  $parameter_name)
private

Returns a parameter with the given name from the current GET request.

Parameters
string$parameter_name
Returns
string|null

Definition at line 764 of file class.ilCtrl.php.

764 : ?string
765 {
766 if ($this->get_parameters->has($parameter_name)) {
767 return $this->get_parameters->retrieve(
768 $parameter_name,
769 $this->refinery->to()->string()
770 );
771 }
772
773 return null;
774 }

References ILIAS\Repository\refinery().

Referenced by getParameterArrayByClass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRedirectSource()

ilCtrl::getRedirectSource ( )

@inheritDoc

Implements ilCtrlInterface.

Definition at line 651 of file class.ilCtrl.php.

651 : ?string
652 {
653 return $this->context->getRedirectSource();
654 }

◆ getTableCommand()

ilCtrl::getTableCommand ( )
private
Deprecated:

Definition at line 779 of file class.ilCtrl.php.

779 : ?string
780 {
781 if ($this->post_parameters->has('table_top_cmd')) {
782 return $this->post_parameters->retrieve(
783 'table_top_cmd',
784 $this->refinery->custom()->transformation(function ($item): ?string {
785 return is_array($item) ? key($item) : null;
786 })
787 );
788 }
789 // Button on top of the table
790 if ($this->post_parameters->has('select_cmd2')) {
791 return $this->post_parameters->has('selected_cmd2')
792 ? $this->post_parameters->retrieve('selected_cmd2', $this->refinery->to()->string())
793 : null;
794 }
795 // Button at bottom of the table
796 if ($this->post_parameters->has('select_cmd')) {
797 return $this->post_parameters->has('selected_cmd')
798 ? $this->post_parameters->retrieve('selected_cmd', $this->refinery->to()->string())
799 : null;
800 }
801
802 return null;
803 }

References ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ getTargetUrl()

ilCtrl::getTargetUrl (   $a_class,
?string  $a_cmd = null,
?string  $a_anchor = null,
bool  $is_async = false,
bool  $is_escaped = false,
bool  $is_post = false 
)
private

Helper function that returns a target URL string.

(that function is horrific, I'm sorry little one)

Parameters
array | string$a_class
string | null$a_cmd
string | null$a_anchor
bool$is_async
bool$is_escaped
bool$is_post
Returns
string|null
Exceptions
ilCtrlException

Definition at line 849 of file class.ilCtrl.php.

856 : ?string {
857 if (empty($a_class)) {
858 throw new ilCtrlException(__METHOD__ . " was provided with an empty class or class-array.");
859 }
860
861 $is_array = is_array($a_class);
862
863 $path = $this->path_factory->find($this->context, $a_class);
864 if (null !== ($exception = $path->getException())) {
865 throw $exception;
866 }
867
868 $base_class = $path->getBaseClass();
869 if (null === $base_class) {
870 throw new ilCtrlException("Cannot find a valid baseclass in the cid path '{$path->getCidPath()}'");
871 }
872
873 $target_url = $this->context->getTargetScript();
874 $target_url = $this->appendParameterString(
875 $target_url,
876 self::PARAM_BASE_CLASS,
877 urlencode($base_class), // encode in case of namespaced classes
878 $is_escaped
879 );
880
881 $cmd_class = ($is_array) ?
882 $a_class[array_key_last($a_class)] :
883 $a_class;
884
885 // only append the cid path and command class params
886 // if they exist.
887 if (null !== $path->getNextCid($base_class)) {
888 $target_url = $this->appendParameterString(
889 $target_url,
890 self::PARAM_CID_PATH,
891 $path->getCidPath(),
892 $is_escaped
893 );
894
895 $target_url = $this->appendParameterString(
896 $target_url,
897 self::PARAM_CMD_CLASS,
898 urlencode($cmd_class), // encode in case of namespaced classes
899 $is_escaped
900 );
901 }
902
903 // if the target url is generated for form actions,
904 // the command must be set to 'post'.
905 if ($is_post) {
906 $target_url = $this->appendParameterString(
907 $target_url,
908 self::PARAM_CMD,
909 self::CMD_POST,
910 $is_escaped
911 );
912 }
913
914 // the actual command is appended as fallback command
915 // for form actions and 'normal' get requests.
916 if (!empty($a_cmd)) {
917 $target_url = $this->appendParameterString(
918 $target_url,
919 ($is_post) ? self::PARAM_CMD_FALLBACK : self::PARAM_CMD,
920 $a_cmd,
921 $is_escaped
922 );
923 }
924
925 // collect all parameters of classes within the current
926 // targets path and append them to the target url.
927 foreach ($path->getCidArray(SORT_ASC) as $cid) {
928 $class_name = $this->structure->getClassNameByCid($cid);
929 if (null === $class_name) {
930 throw new ilCtrlException("Classname for cid '$cid' in current path cannot be found.");
931 }
932
933 $target_url = $this->appendParameterStringsByClass(
934 $class_name,
935 $target_url,
936 $is_escaped
937 );
938 }
939
940 // append a csrf token if the command is considered
941 // unsafe or the link is for form actions.
942 if (!$this->isCmdSecure($is_post, $cmd_class, $a_cmd)) {
943 $token = $this->token_repository->getToken();
944 $target_url = $this->appendParameterString(
945 $target_url,
946 self::PARAM_CSRF_TOKEN,
947 $token->getToken(),
948 $is_escaped
949 );
950 }
951
952 if ($is_async) {
953 $target_url = $this->appendParameterString(
954 $target_url,
955 self::PARAM_CMD_MODE,
956 self::CMD_MODE_ASYNC,
957 $is_escaped
958 );
959 }
960
961 if (!empty($a_anchor)) {
962 $target_url .= "#$a_anchor";
963 }
964
965 return $target_url;
966 }
appendParameterStringsByClass(string $class_name, string $target_url, bool $is_escaped=false)
Appends all parameters for a given class to the given URL.
$token
Definition: xapitoken.php:70

◆ insertCtrlCalls()

ilCtrl::insertCtrlCalls (   $a_parent,
  $a_child,
string  $a_comp_prefix 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 659 of file class.ilCtrl.php.

659 : void
660 {
661 throw new ilCtrlException(__METHOD__ . " is deprecated and must not be used.");
662 }

◆ isAsynch()

ilCtrl::isAsynch ( )

@inheritDoc

Implements ilCtrlInterface.

Definition at line 571 of file class.ilCtrl.php.

571 : bool
572 {
573 return $this->context->isAsync();
574 }

Referenced by ilBlockGUI\getHTML(), ilNoteGUI\getWidget(), ilLearningHistoryGUI\renderButton(), and ilNoteGUI\renderContent().

+ Here is the caller graph for this function:

◆ isCmdSecure()

ilCtrl::isCmdSecure ( bool  $is_post,
string  $cmd_class,
?string  $cmd = null 
)
private

Returns whether a given command is considered safe or not.

Parameters
bool$is_post
string$cmd_class
string | null$cmd
Returns
bool

Definition at line 1008 of file class.ilCtrl.php.

1008 : bool
1009 {
1010 // if no command is specified, the command is
1011 // considered safe if it's not a POST command.
1012 if (null === $cmd) {
1013 return !$is_post;
1014 }
1015
1016 // if the given command class doesn't exist, the
1017 // command is not considered safe as it might've been
1018 // tampered with.
1019 $obj_name = $this->structure->getObjNameByName($cmd_class);
1020 if (null === $obj_name) {
1021 return false;
1022 }
1023
1024 // if the command class does not yet implement the
1025 // ilCtrlSecurityInterface, the command is considered
1026 // safe if it's not a POST command.
1027 if (!is_a($obj_name, ilCtrlSecurityInterface::class, true)) {
1028 return !$is_post;
1029 }
1030
1031 // the post command is considered safe if it's contained
1032 // in the list of safe post commands.
1033 if ($is_post) {
1034 return in_array($cmd, $this->structure->getSafeCommandsByName($cmd_class), true);
1035 }
1036
1037 // the get command is considered safe if it's not
1038 // contained in the list of unsafe get commands.
1039 return !in_array($cmd, $this->structure->getUnsafeCommandsByName($cmd_class), true);
1040 }

◆ lookupClassPath()

ilCtrl::lookupClassPath ( string  $a_class)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 532 of file class.ilCtrl.php.

532 : string
533 {
534 $path = $this->structure->getRelativePathByName($a_class);
535 if (null === $path) {
536 throw new ilCtrlException("Class '$a_class' cannot be found in the control structure.");
537 }
538
539 return $path;
540 }

References $path.

Referenced by ilLTIRouterGUI\executeCommand().

+ Here is the caller graph for this function:

◆ lookupOriginalClassName()

ilCtrl::lookupOriginalClassName ( string  $a_class)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 545 of file class.ilCtrl.php.

545 : ?string
546 {
547 return $this->structure->getObjNameByName($a_class);
548 }

◆ populateCall()

ilCtrl::populateCall ( string  $class_name,
string  $cmd_mode 
)
private

Helper function that populates a call in the current stacktrace.

Parameters
string$class_name
string$cmd_mode

Definition at line 1118 of file class.ilCtrl.php.

1118 : void
1119 {
1120 $obj_name = $this->structure->getObjNameByName($class_name);
1121
1122 $this->stacktrace[] = [
1123 self::PARAM_CMD_CLASS => $obj_name,
1124 self::PARAM_CMD_MODE => $cmd_mode,
1125 self::PARAM_CMD => $this->getDeterminedCommand(),
1126 ];
1127 }

Referenced by forwardCommand(), and getHTML().

+ Here is the caller graph for this function:

◆ redirect()

ilCtrl::redirect ( object  $a_gui_obj,
?string  $a_cmd = null,
?string  $a_anchor = null,
bool  $is_async = false 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 393 of file class.ilCtrl.php.

398 : void {
399 $this->redirectByClass(
400 $this->getClassByObject($a_gui_obj),
401 $a_cmd,
402 $a_anchor,
403 $is_async
404 );
405 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

Referenced by ilBadgeProfileGUI\activate(), ilBadgeProfileGUI\activateInCard(), ilExcCriteriaGUI\add(), ilExAssignmentEditorGUI\addAssignmentObject(), ilSessionStatisticsGUI\adminSync(), ilObjBlogGUI\afterSave(), ilSkillTreeNodeGUI\afterUpdate(), ilRecommendedContentRoleConfigGUI\assignItem(), ilObjAwarenessAdministrationGUI\cancel(), ilObjBlogAdministrationGUI\cancel(), ilObjExerciseAdministrationGUI\cancel(), ilObjMediaCastSettingsGUI\cancel(), ilObjPortfolioAdministrationGUI\cancel(), ilObjTaggingSettingsGUI\cancel(), ilSkillRootGUI\cancelDelete(), ilObjMediaPoolGUI\cancelSave(), ilInternalLinkGUI\changeLinkType(), ilRecommendedContentRoleConfigGUI\checkPushPermission(), ilPortfolioRoleAssignmentGUI\confirmAssignmentDeletion(), ilContSkillAdminGUI\confirmDeleteSingleLocalProfile(), ilContSkillAdminGUI\confirmRemoveSelectedGlobalProfiles(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilContSkillAdminGUI\confirmRemoveSingleGlobalProfile(), ilBadgeProfileGUI\deactivate(), ilBadgeProfileGUI\deactivateInCard(), ilContSkillAdminGUI\deassignCompetences(), ilContSkillAdminGUI\deassignCompetencesConfirm(), ilChatroomBanGUI\delete(), ilPortfolioRoleAssignmentGUI\deleteAssignments(), ilBasicSkillGUI\deleteLevel(), ilContSkillAdminGUI\deleteSingleLocalProfile(), ilChatroomAdminViewGUI\executeDefault(), ilChatroomViewGUI\executeDefault(), ilChatroomBanGUI\handleTableActions(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilSurveyParticipantsGUI\inviteUsers(), ilContSkillAdminGUI\publishAssignments(), ilEditClipboardGUI\remove(), ilContSkillAdminGUI\removeSelectedGlobalProfiles(), ilContSkillAdminGUI\removeSelectedSkill(), ilContSkillAdminGUI\removeSingleGlobalProfile(), ilInternalLinkGUI\resetLinkList(), ilObjMediaPoolGUI\returnFromItem(), ilObjNotificationSettingsGUI\save(), ilTaxMDGUI\save(), ilPortfolioRoleAssignmentGUI\saveAssignment(), ilObjPortfolioAdministrationGUI\saveAuthorship(), ilChatroomAdminViewGUI\saveClientSettings(), ilContSkillAdminGUI\saveCompetenceAssignment(), ilContainerFilterAdminGUI\saveFields(), ilChatroomSettingsGUI\saveGeneral(), ilObjBookingPoolGUI\saveNotificationObject(), ilBookingPreferencesGUI\savePreferences(), ilContSkillAdminGUI\saveSelectedProfile(), ilContSkillAdminGUI\saveSelectedSkill(), ilBookingGatewayGUI\saveSettings(), ilContSkillAdminGUI\saveSettings(), ilObjLearningHistorySettingsGUI\saveSettings(), ilObjCommentsSettingsGUI\saveSettings(), ilObjNotesSettingsGUI\saveSettings(), ilExerciseManagementGUI\selectAssignmentObject(), ilExerciseManagementGUI\selectParticipantObject(), ilMediaCreationGUI\selectPool(), ilInternalLinkGUI\setMedPoolFolder(), ilBookingGatewayGUI\show(), ilPCImageMapEditorGUI\updateAreas(), and ilSurveyEvaluationGUI\validateAndSubmitExportForm().

+ Here is the caller graph for this function:

◆ redirectByClass()

ilCtrl::redirectByClass (   $a_class,
?string  $a_cmd = null,
?string  $a_anchor = null,
bool  $is_async = false 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 410 of file class.ilCtrl.php.

415 : void {
416 $this->redirectToURL(
418 $a_class,
419 $a_cmd,
420 $a_anchor,
421 $is_async
422 )
423 );
424 }
redirectToURL(string $target_url)
@inheritDoc

Referenced by ilObjCmiXapiVerificationGUI\_goto(), ilObjCourseReferenceGUI\_goto(), ilObjLTIConsumerVerificationGUI\_goto(), ilObjCmiXapiGUI\_goto(), ilObjCourseVerificationGUI\_goto(), ilObjDataCollectionGUI\_goto(), ilLMPageObjectGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilObjWikiGUI\_goto(), ilObjWorkspaceFolderGUI\_goto(), ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObjectGUI\_gotoSharedWorkspaceNode(), ilNoteGUI\activateComments(), ilObjSkillTreeGUI\confirmedDeleteTrees(), ilContentStyleSettingsGUI\createStyle(), ilNoteGUI\deactivateComments(), ilObjStyleSheetGUI\editObject(), ilChatroomInfoScreenGUI\executeDefault(), ilObjLearningSequenceGUI\forwardByClass(), ilChatroomSettingsGUI\general(), ilAdministrationGUI\jumpToPluginSlot(), ilSkillProfileGUI\listLocalProfiles(), ilChatroomViewGUI\logout(), ilChatroomViewGUI\lostConnection(), ilObjFileBasedLMGUI\redirectAfterCreation(), ilChatroomGUIHandler\redirectIfNoPermission(), ilObjSessionGUI\redirectToParentContentPageObject(), ilRepositoryGUI\redirectToRoot(), ilObjSkillTreeGUI\save(), ilChatroomSettingsGUI\saveGeneral(), ilBookingGatewayGUI\show(), ilAchievementsGUI\show(), ilPDNotesGUI\showPrivateNotes(), ilChatroomViewGUI\showRoom(), and ilObjExerciseGUI\startAssignmentObject().

+ Here is the caller graph for this function:

◆ redirectToURL()

ilCtrl::redirectToURL ( string  $target_url)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 429 of file class.ilCtrl.php.

429 : void
430 {
431 // prepend the ILIAS HTTP path if it wasn't already.
432 if (defined("ILIAS_HTTP_PATH") &&
433 strpos($target_url, "://") === false &&
434 strpos($target_url, "/") !== 0
435 ) {
436 $target_url = ILIAS_HTTP_PATH . "/" . $target_url;
437 }
438
439 // this line can be dropped after discussion with TB or JF,
440 // it keeps the functionality of UI plugin hooks alive.
441 $target_url = $this->modifyUrlWithPluginHooks($target_url);
442
443 // initialize http response object
444 $response = new Response();
445
446 // there's an exceptional case for asynchronous file uploads
447 // where a json response is delivered.
448 if ('application/json' === $this->server_request->getHeaderLine('Accept')) {
449 try {
450 $body = Streams::ofString(
451 json_encode(
452 [
453 'redirect_url' => $target_url,
454 'success' => true,
455 'message' => 'called redirect after asynchronous file-upload request.',
456 ],
457 JSON_THROW_ON_ERROR
458 )
459 );
460 } catch (Throwable $exception) {
461 $body = Streams::ofString($exception->getMessage());
462 }
463
464 $response = $response->withBody($body);
465 } else {
466 $response = $response->withAddedHeader('Location', $target_url);
467 }
468
469 // manually trigger session_write_close() due to exceptions stored
470 // in the ILIAS database, otherwise this method is called by exit()
471 // which leads to the exceptions not being written to the database.
472 session_write_close();
473
474 try {
475 $this->response_sender->sendResponse($response);
476 } catch (ResponseSendingException $e) {
477 header("Location: $target_url");
478 if ('application/json' === $this->server_request->getHeaderLine('Accept')) {
479 $content = (null !== $response->getBody()) ?
480 $response->getBody()->getContents() :
481 [];
482
483 echo json_encode($content, JSON_THROW_ON_ERROR);
484 }
485 } catch (Throwable $t) {
486 header("Location: $target_url");
487 echo $t->getMessage();
488 }
489
490 exit;
491 }
exit
$response
Definition: xapitoken.php:93

References Vendor\Package\$e, $response, exit, and ILIAS\UI\examples\Symbol\Glyph\Header\header().

Referenced by ilKSDocumentationGotoLink\redirectWithGotoLink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ returnToParent()

ilCtrl::returnToParent ( object  $a_gui_obj,
?string  $a_anchor = null 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 601 of file class.ilCtrl.php.

601 : void
602 {
603 $class_name = $this->getClassByObject($a_gui_obj);
604 $target_url = $this->getParentReturnByClass($class_name);
605
606 // append redirect source to target url.
607 $target_url = $this->appendParameterString(
608 $target_url,
609 self::PARAM_REDIRECT,
610 $class_name
611 );
612
613 // append the provided anchor if necessary.
614 if (null !== $a_anchor) {
615 $target_url .= "#$a_anchor";
616 }
617
618 $this->redirectToURL($target_url);
619 }

Referenced by ilMediaCreationGUI\cancel(), ilMediaCreationGUI\cancelCreate(), ilNewsForContextBlockGUI\cancelSettings(), ilObjectCopyGUI\keepObjectsInClipboard(), and ilMediaCreationGUI\saveTitlesAndDescriptions().

+ Here is the caller graph for this function:

◆ saveParameter()

ilCtrl::saveParameter ( object  $a_gui_obj,
  $a_parameter 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 212 of file class.ilCtrl.php.

212 : void
213 {
214 $this->saveParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter);
215 }
saveParameterByClass(string $a_class, $a_parameter)
@inheritDoc

References getClassByObject(), and saveParameterByClass().

Referenced by ilSurveySkillGUI\assignSkillToQuestion(), ilMediaCreationGUI\editTitlesAndDescriptions(), ilNewsTimelineGUI\executeCommand(), ilBookingGatewayGUI\initPool(), and ilChatroomViewGUI\showNameSelection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveParameterByClass()

ilCtrl::saveParameterByClass ( string  $a_class,
  $a_parameter 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 220 of file class.ilCtrl.php.

220 : void
221 {
222 if (!empty($a_parameter)) {
223 if (is_array($a_parameter)) {
224 foreach ($a_parameter as $parameter) {
225 $this->structure->setPermanentParameterByClass($a_class, $parameter);
226 }
227 } else {
228 $this->structure->setPermanentParameterByClass($a_class, $a_parameter);
229 }
230 }
231 }

Referenced by ilContainerContentGUI\getRightColumnHTML(), and saveParameter().

+ Here is the caller graph for this function:

◆ setContextObject()

ilCtrl::setContextObject ( int  $obj_id,
string  $obj_type 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 496 of file class.ilCtrl.php.

496 : void
497 {
498 // cannot process object without object type.
499 if (!empty($obj_type)) {
500 $this->context->setObjId($obj_id);
501 $this->context->setObjType($obj_type);
502 }
503 }

◆ setParameter()

ilCtrl::setParameter ( object  $a_gui_obj,
string  $a_parameter,
  $a_value 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 236 of file class.ilCtrl.php.

236 : void
237 {
238 $this->setParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter, $a_value);
239 }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc

References getClassByObject(), and setParameterByClass().

Referenced by ilObjWikiGUI\addPagesSubTabs(), ilObjWikiGUI\addPageTabs(), ilPCDataTableGUI\afterCreation(), ilContSkillAdminGUI\assignCompetences(), ilObjMediaPoolGUI\cancelFolderUpdate(), ilInternalLinkGUI\changeLinkType(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilLMPageObjectGUI\create(), ilSkillTreeNodeGUI\deleteNodes(), ilNoteGUI\deleteNote(), ilObjSkillTreeGUI\editSkillTemplates(), ilGroupAddToGroupActionGUI\executeCommand(), ilBookingSchedulesTableGUI\fillRow(), ilCopySelfAssQuestionTableGUI\fillRow(), ilPageLayoutTableGUI\fillRow(), ilAssignmentsPerParticipantTableGUI\fillRow(), ilExerciseVerificationTableGUI\fillRow(), ilParticipantsPerAssignmentTableGUI\fillRow(), ilExcCriteriaCatalogueTableGUI\fillRow(), ilExcCriteriaTableGUI\fillRow(), ilHelpModuleTableGUI\fillRow(), ilLMGlossaryTableGUI\fillRow(), ilLMMenuItemsTableGUI\fillRow(), ilClipboardTableGUI\fillRow(), ilWorkspaceAccessTableGUI\fillRow(), ilNewItemGroupTableGUI\fillRow(), ilSkillLevelTableGUI\fillRow(), ilStyleMediaQueryTableGUI\fillRow(), ilTableTemplatesTableGUI\fillRow(), ilStyleColorTableGUI\fillRow(), ilSurveySkillAssignmentTableGUI\fillRow(), ilSurveySkillTableGUI\fillRow(), ilTaxonomyListTableGUI\fillRow(), ilTaxonomyTableGUI\fillRow(), ILIAS\COPage\Page\PageQueryActionHandler\getActionsDropDown(), ilNoteGUI\getGlyph(), ilLikeGUI\getHTML(), ilCommentGUI\getListHTML(), ILIAS\COPage\Page\PageQueryActionHandler\getMultiLangActions(), ilNoteGUI\getNotesHTML(), ilNoteGUI\getNumber(), ilNoteGUI\getTriggerShyButton(), ilNoteGUI\getWidget(), ilInternalLinkGUI\init(), ilObjBookingPoolGUI\initHeaderAction(), ilBookingGatewayGUI\initPool(), ilSkillProfileGUI\initProfileForm(), ilExAssignmentEditorGUI\listAssignmentsObject(), ilMediaCreationGUI\listPoolItems(), ilPCContentIncludeGUI\poolSelection(), ilLearningHistoryGUI\renderButton(), ilInternalLinkGUI\resetLinkList(), ilObjMediaPoolGUI\returnFromItem(), ilExerciseManagementGUI\selectAssignmentObject(), ilExerciseManagementGUI\selectParticipantObject(), ilPCContentIncludeGUI\selectPool(), ilPCQuestionGUI\selectPool(), ilMediaCreationGUI\selectPool(), ilInternalLinkGUI\setMedPoolFolder(), ilRepositorySelectorInputGUI\showRepositorySelection(), and ilSurveyEvaluationGUI\validateAndSubmitExportForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setParameterByClass()

ilCtrl::setParameterByClass ( string  $a_class,
string  $a_parameter,
  $a_value 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 244 of file class.ilCtrl.php.

244 : void
245 {
246 $this->structure->setTemporaryParameterByClass($a_class, $a_parameter, $a_value);
247 }

Referenced by ilObjCmiXapiVerificationGUI\_goto(), ilObjCourseReferenceGUI\_goto(), ilObjLTIConsumerVerificationGUI\_goto(), ilObjCmiXapiGUI\_goto(), ilObjCourseVerificationGUI\_goto(), ilObjDataCollectionGUI\_goto(), ilLMPageObjectGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilObjWikiGUI\_goto(), ilObjWorkspaceFolderGUI\_goto(), ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObjectGUI\_gotoSharedWorkspaceNode(), ilBlockGUI\addRepoCommands(), ilBasicSkillGUI\afterSave(), ilBasicSkillTemplateGUI\afterSave(), ilSkillTemplateReferenceGUI\afterSave(), ILIAS\User\StaticURLHandler\buildChangeEmailUrl(), ILIAS\Test\StaticURLHandler\buildQuestionURL(), ilExAssTypeWikiTeamGUI\buildSubmissionPropertiesAndActions(), ilContSkillAdminGUI\confirmDeleteSingleLocalProfile(), ilContSkillAdminGUI\confirmRemoveSingleGlobalProfile(), ilObjSkillTreeGUI\editSkills(), ilBookingParticipantsTableGUI\fillRow(), ilHistoryTableGUI\fillRow(), ilLinksTableGUI\fillRow(), ilSkillCatTableGUI\fillRow(), ilContentStylesTableGUI\fillRow(), ilFoundUsersTableGUI\fillRow(), ilObjLearningSequenceGUI\forwardByClass(), ilChatroomSettingsGUI\general(), ILIAS\LearningModule\Menu\ilLMMenuGUI\getEntries(), ilRepositorySelector2InputGUI\getHTML(), McstImageGalleryGUI\getHTML(), McstPodcastGUI\getHTML(), ilExAssignmentInfo\getInstructionFileInfo(), ilNoteGUI\getItemForNote(), ilNewsForContextBlockGUI\getJSEnabler(), ilPoolSelectorGUI\getNodeHref(), ilPCFileItemFileSelectorGUI\getNodeHref(), ilMediaPoolExplorerGUI\getNodeHref(), ilRepositoryExplorerGUI\getNodeHref(), ilRepositorySelectorExplorerGUI\getNodeHref(), ilPersonalSkillExplorerGUI\getNodeHref(), ilSkillTemplateTreeExplorerGUI\getNodeHref(), ilTaxonomyExplorerGUI\getNodeHref(), ilNoteGUI\getShyButton(), ilBookingPreferencesGUI\listBookingResults(), ilChatroomViewGUI\logout(), ilObjFileBasedLMGUI\redirectAfterCreation(), ilChatroomGUIHandler\redirectIfNoPermission(), ilContainerReferenceGUI\redirectObject(), ilBasicSkillTemplateGUI\redirectToParent(), ilSkillTemplateReferenceGUI\redirectToParent(), ilObjSessionGUI\redirectToParentContentPageObject(), ilRepositoryGUI\redirectToRoot(), ilRepositorySelector2InputGUI\render(), ilExAssTypeWikiTeamGUI\renderOverviewContent(), ilChatroomSettingsGUI\saveGeneral(), setParameter(), ilObjSkillTreeGUI\showLocator(), ilObjExerciseGUI\startAssignmentObject(), and ilExerciseManagementGUI\waitingDownloadObject().

+ Here is the caller graph for this function:

◆ setReturn()

ilCtrl::setReturn ( object  $a_gui_obj,
?string  $a_cmd = null 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 579 of file class.ilCtrl.php.

579 : void
580 {
581 $this->setReturnByClass($this->getClassByObject($a_gui_obj), $a_cmd);
582 }
setReturnByClass(string $a_class, ?string $a_cmd=null)
@inheritDoc

Referenced by ilBookingGatewayGUI\executeCommand(), ilAssignmentPresentationGUI\executeCommand(), and ilTaxonomySettingsGUI\executeCommand().

+ Here is the caller graph for this function:

◆ setReturnByClass()

ilCtrl::setReturnByClass ( string  $a_class,
?string  $a_cmd = null 
)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 587 of file class.ilCtrl.php.

587 : void
588 {
589 $this->structure->setReturnTargetByClass(
590 $a_class,
592 $a_class,
593 $a_cmd
594 )
595 );
596 }

Referenced by ilObjectCopyGUI\cancel().

+ Here is the caller graph for this function:

◆ setTargetScript()

ilCtrl::setTargetScript ( string  $a_target_script)

@inheritDoc

Implements ilCtrlInterface.

Definition at line 563 of file class.ilCtrl.php.

563 : void
564 {
565 $this->context->setTargetScript($a_target_script);
566 }

Referenced by ilObjCourseReferenceGUI\_goto(), ilObjCmiXapiGUI\_goto(), ilObjectPluginGUI\afterSave(), ilImageMapEditorGUI\editMapAreas(), and ilObjLearningSequenceGUI\forwardByClass().

+ Here is the caller graph for this function:

Field Documentation

◆ $command

string ilCtrl::$command = null
protected

Definition at line 38 of file class.ilCtrl.php.

Referenced by getCmd().

◆ $exec_object

object ilCtrl::$exec_object = null
protected

Definition at line 37 of file class.ilCtrl.php.

Referenced by getHTML().

◆ $stacktrace

array ilCtrl::$stacktrace = []
protected

Definition at line 45 of file class.ilCtrl.php.


The documentation for this class was generated from the following file: