ILIAS  release_8 Revision v8.24
ilCtrl Class Reference

Class ilCtrl provides processing control methods. More...

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

Public Member Functions

 __construct (ilCtrlStructureInterface $structure, ilCtrlTokenRepositoryInterface $token_repository, ilCtrlPathFactoryInterface $path_factory, ilCtrlContextInterface $context, ResponseSenderStrategy $response_sender, ServerRequestInterface $server_request, RequestWrapper $post_parameters, RequestWrapper $get_parameters, Refinery $refinery, ilComponentFactory $component_factory, ilCtrlQueryParserInterface $query_parser)
 ilCtrl Constructor More...
 
 __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...
 
 setCmd (?string $a_cmd)
 @inheritDoc More...
 
 getCmdClass ()
 @inheritDoc More...
 
 setCmdClass ($a_cmd_class)
 @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...
 
 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. 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. More...
 
 setCmd (?string $a_cmd)
 Sets the current command. More...
 
 getCmdClass ()
 Returns the fully-qualified classname of the requested command class. More...
 
 setCmdClass ($a_cmd_class)
 Sets the command class that should be executed next. 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...
 

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...
 

Private Attributes

ResponseSenderStrategy $response_sender
 
ServerRequestInterface $server_request
 
RequestWrapper $post_parameters
 
RequestWrapper $get_parameters
 
Refinery $refinery
 
ilCtrlStructureInterface $structure
 
ilCtrlTokenRepositoryInterface $token_repository
 
ilCtrlContextInterface $context
 
ilCtrlPathFactoryInterface $path_factory
 
ilComponentFactory $component_factory
 
ilCtrlQueryParserInterface $query_parser
 
array $stacktrace = []
 
object $exec_object = null
 

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 34 of file class.ilCtrl.php.

Constructor & Destructor Documentation

◆ __construct()

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

ilCtrl Constructor

Parameters
ilCtrlStructureInterface$structure
ilCtrlTokenRepositoryInterface$token_repository
ilCtrlPathFactoryInterface$path_factory
ilCtrlContextInterface$context
ResponseSenderStrategy$response_sender
ServerRequestInterface$server_request
RequestWrapper$post_parameters
RequestWrapper$get_parameters
Refinery$refinery
ilComponentFactory$component_factory

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

135 {
136 $this->structure = $structure;
137 $this->token_repository = $token_repository;
138 $this->response_sender = $response_sender;
139 $this->server_request = $server_request;
140 $this->post_parameters = $post_parameters;
141 $this->get_parameters = $get_parameters;
142 $this->refinery = $refinery;
143 $this->path_factory = $path_factory;
144 $this->context = $context;
145 $this->component_factory = $component_factory;
146 $this->query_parser = $query_parser;
147 }
Refinery $refinery
RequestWrapper $get_parameters
ilComponentFactory $component_factory
ResponseSenderStrategy $response_sender
ilCtrlContextInterface $context
RequestWrapper $post_parameters
ilCtrlQueryParserInterface $query_parser
ServerRequestInterface $server_request
ilCtrlStructureInterface $structure
ilCtrlTokenRepositoryInterface $token_repository
ilCtrlPathFactoryInterface $path_factory

References $component_factory, $context, $get_parameters, $path_factory, $post_parameters, $query_parser, $refinery, $response_sender, $server_request, $structure, $token_repository, and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

Member Function Documentation

◆ __clone()

ilCtrl::__clone ( )

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

150 {
151 $this->structure = clone $this->structure;
152 }

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 1126 of file class.ilCtrl.php.

1130 : string {
1131 $class_parameters = $this->getParameterArrayByClass($class_name);
1132 if (!empty($class_parameters)) {
1133 foreach ($class_parameters as $key => $value) {
1134 $target_url = $this->appendParameterString(
1135 $target_url,
1136 $key,
1137 $value,
1138 $is_escaped
1139 );
1140 }
1141 }
1142
1143 return $target_url;
1144 }
getParameterArrayByClass(string $a_class)
@inheritDoc
string $key
Consumer key/client ID value.
Definition: System.php:193

References ILIAS\LTI\ToolProvider\$key.

◆ callBaseClass()

ilCtrl::callBaseClass ( string  $a_base_class = null)

@inheritDoc

Implements ilCtrlInterface.

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

157 : void
158 {
159 // prioritise the context's baseclass over the given one.
160 $a_base_class = $this->context->getBaseClass() ?? $a_base_class;
161
162 // abort if no baseclass was provided.
163 if (null === $a_base_class) {
164 throw new ilCtrlException(__METHOD__ . " was not given a baseclass and the request doesn't include one either.");
165 }
166
167 // abort if the provided baseclass is unknown.
168 if (!$this->structure->isBaseClass($a_base_class)) {
169 throw new ilCtrlException("Provided class '$a_base_class' is not a baseclass");
170 }
171
172 // in case the baseclass was given by argument,
173 // set the context's baseclass.
174 $this->context->setBaseClass($a_base_class);
175
176 // no null-check needed as previous isBaseClass() was true.
177 $obj_name = $this->structure->getObjNameByName($a_base_class);
178 $this->forwardCommand(new $obj_name());
179 }
ilCtrl exceptions
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 804 of file class.ilCtrl.php.

804 : bool
805 {
806 $class_cid = $this->structure->getClassCidByName($gui_class);
807 if (null === $class_cid) {
808 return false;
809 }
810
811 return strpos(
812 $this->context->getPath()->getCidPath() ?? '',
813 $class_cid
814 ) !== false;
815 }

◆ clearParameterByClass()

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

@inheritDoc

Implements ilCtrlInterface.

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

445 : void
446 {
447 $this->structure->removeSingleParameterByClass($a_class, $a_parameter);
448 }

◆ clearParameters()

ilCtrl::clearParameters ( object  $a_gui_obj)

@inheritDoc

Implements ilCtrlInterface.

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

426 : void
427 {
428 $this->clearParametersByClass($this->getClassByObject($a_gui_obj));
429 }
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 434 of file class.ilCtrl.php.

434 : void
435 {
436 // apparently permanent parameters should not be removable,
437 // therefore the line below stays commented:
438 // $this->structure->removePermanentParametersByClass($a_class);
439 $this->structure->removeTemporaryParametersByClass($a_class);
440 }

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

+ Here is the caller graph for this function:

◆ forwardCommand()

ilCtrl::forwardCommand ( object  $a_gui_object)

@inheritDoc

Implements ilCtrlInterface.

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

185 {
186 $class_name = get_class($a_gui_object);
187
188 // @TODO: remove this check once an interface for command classes exists.
189 if (!method_exists($a_gui_object, 'executeCommand')) {
190 throw new ilCtrlException("$class_name doesn't implement executeCommand().");
191 }
192
193 $this->exec_object = $a_gui_object;
194 $this->populateCall($class_name, self::CMD_MODE_PROCESS);
195
196 // with forward command we cannot progress, or set
197 // the current command class. Otherwise, the path-
198 // finding gets mixed up, as it can only be used in
199 // getHTML() method calls.
200 $this->context
201 ->setCmdMode(self::CMD_MODE_PROCESS);
202
203 return $a_gui_object->executeCommand();
204 }
populateCall(string $class_name, string $cmd_mode)
Helper function that populates a call in the current stacktrace.

References populateCall().

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

+ 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 661 of file class.ilCtrl.php.

661 : array
662 {
663 return $this->stacktrace;
664 }
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 1211 of file class.ilCtrl.php.

1211 : string
1212 {
1213 return (is_object($object)) ? get_class($object) : $object;
1214 }

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 690 of file class.ilCtrl.php.

690 : string
691 {
692 $path_info = pathinfo($a_class_path);
693
694 return substr($path_info['basename'], 6, -4);
695 }

◆ getCmd()

ilCtrl::getCmd ( string  $fallback_command = null)

@inheritDoc

Implements ilCtrlInterface.

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

241 : ?string
242 {
243 // retrieve $_GET and $_POST parameters.
244 $post_command = $this->getPostCommand();
245 $get_command = $this->getQueryParam(self::PARAM_CMD);
246 $table_command = $this->getTableCommand();
247
248 $is_post = (self::CMD_POST === $get_command);
249
250 // if the $_GET command is 'post', either the $_POST
251 // command or $_GETs fallback command is used.
252 // for now, the table command is used as fallback as well,
253 // but this will be removed once the implementation of
254 // table actions change.
255 $command = ($is_post) ?
256 $post_command ?? $table_command ?? $this->getQueryParam(self::PARAM_CMD_FALLBACK) :
257 $get_command;
258
259 // override the command that has been set during a
260 // request via ilCtrl::setCmd().
261 $context_command = $this->context->getCmd();
262 if (null !== $context_command && self::CMD_POST !== $context_command) {
263 $command = $context_command;
264 }
265
266 if (null !== $command) {
267 // if the command is for post requests, or the command
268 // is not considered safe, the csrf-validation must pass.
269 $cmd_class = $this->context->getCmdClass();
270
271 if (null !== $cmd_class && !$this->isCmdSecure($is_post, $cmd_class, $command)) {
272 $stored_token = $this->token_repository->getToken();
273 $sent_token = $this->getQueryParam(self::PARAM_CSRF_TOKEN);
274
275 if (null !== $sent_token && $stored_token->verifyWith($sent_token)) {
276 return $command;
277 }
278 return $fallback_command ?? '';
279 }
280 return $command;
281 }
282
283 return $fallback_command ?? '';
284 }
isCmdSecure(bool $is_post, string $cmd_class, string $cmd=null)
Returns whether a given command is considered safe or not.
getPostCommand()
Returns the current $_POST command.
getTableCommand()
getQueryParam(string $parameter_name)
Returns a parameter with the given name from the current GET request.

References getPostCommand(), getQueryParam(), getTableCommand(), and isCmdSecure().

Referenced by ilBookingProcessGUI\executeCommand(), ilBookingGatewayGUI\executeCommand(), ilBookingPreferencesGUI\executeCommand(), ilBookingReservationsGUI\executeCommand(), ilExcRandomAssignmentGUI\executeCommand(), ilGroupAddToGroupActionGUI\executeCommand(), ilGroupUserActionsGUI\executeCommand(), ilLMImportGUI\executeCommand(), McstImageGalleryGUI\executeCommand(), McstPodcastGUI\executeCommand(), ilMediaPoolImportGUI\executeCommand(), ilPortfolioRoleAssignmentGUI\executeCommand(), ilSurveyConstraintsGUI\executeCommand(), ilSurveyRaterGUI\executeCommand(), ilSurveySkillDeterminationGUI\executeCommand(), ilSurveySkillGUI\executeCommand(), ilSurveySkillThresholdsGUI\executeCommand(), ilAccordionPropertiesStorageGUI\executeCommand(), ilSessionStatisticsGUI\executeCommand(), ilClassificationBlockGUI\executeCommand(), ilContainerBlockPropertiesStorageGUI\executeCommand(), ilContainerFilterAdminGUI\executeCommand(), ilPCQuestionGUI\executeCommand(), ilPageEditorServerAdapterGUI\executeCommand(), ilAchievementsGUI\executeCommand(), ilObjLearningHistorySettingsGUI\executeCommand(), ilLearningHistoryGUI\executeCommand(), ilMediaCreationGUI\executeCommand(), ilObjCommentsSettingsGUI\executeCommand(), ilObjNotesSettingsGUI\executeCommand(), ilObjNotificationSettingsGUI\executeCommand(), ilObjPersonalWorkspaceSettingsGUI\executeCommand(), ilDashboardRecommendedContentGUI\executeCommand(), ilRecommendedContentRoleConfigGUI\executeCommand(), ilSkillTreeAdminGUI\executeCommand(), ilObjStyleSheetGUI\executeCommand(), ilTablePropertiesStorageGUI\executeCommand(), ilTaggingSlateContentGUI\executeCommand(), ilPDTasksBlockGUI\executeCommand(), ilDerivedTasksGUI\executeCommand(), ilCharSelectorGUI\executeCommand(), ilObjWorkflowEngineGUI\executeCommand(), and ilContainerGUI\forwardToPageObject().

+ 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 301 of file class.ilCtrl.php.

301 : ?string
302 {
303 if (null !== ($cmd_class = $this->context->getCmdClass())) {
304 return strtolower($this->structure->getObjNameByName($cmd_class));
305 }
306
307 return '';
308 }

◆ getContextObjId()

ilCtrl::getContextObjId ( )

@inheritDoc

Implements ilCtrlInterface.

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

645 : ?int
646 {
647 return $this->context->getObjId();
648 }

◆ getContextObjType()

ilCtrl::getContextObjType ( )

@inheritDoc

Implements ilCtrlInterface.

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

653 : ?string
654 {
655 return $this->context->getObjType();
656 }

◆ getCurrentClassPath()

ilCtrl::getCurrentClassPath ( )

@inheritDoc

Implements ilCtrlInterface.

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

820 : array
821 {
822 if (null === $this->context->getPath()->getCidPath()) {
823 return [];
824 }
825
826 $class_paths = [];
827 foreach ($this->context->getPath()->getCidArray(SORT_ASC) as $cid) {
828 $class_paths[] = $this->structure->getObjNameByCid($cid);
829 }
830
831 return $class_paths;
832 }

◆ 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 491 of file class.ilCtrl.php.

497 : string {
498 return $this->getFormActionByClass(
499 $this->getClassByObject($a_gui_obj),
500 $a_fallback_cmd,
501 $a_anchor,
502 $is_async,
503 $has_xml_style
504 );
505 }
getFormActionByClass( $a_class, string $a_fallback_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc

Referenced by ilTestSkillLevelThresholdsTableGUI\__construct(), ilAddAnswerFormBuilder\__construct(), ILIAS\Style\Content\CharacteristicTableGUI\__construct(), ilFeedbackConfirmationTable2GUI\__construct(), ilExAssignmentTeamLogTableGUI\__construct(), ilParticipantsPerAssignmentTableGUI\__construct(), ilChatroomHistoryGUI\byDay(), ilChatroomHistoryGUI\bySession(), ilPortfolioRoleAssignmentGUI\confirmAssignmentDeletion(), ilContSkillAdminGUI\confirmDeleteSelectedLocalProfiles(), ilContSkillAdminGUI\confirmDeleteSingleLocalProfile(), ilContSkillAdminGUI\confirmRemoveSelectedGlobalProfiles(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilContSkillAdminGUI\confirmRemoveSingleGlobalProfile(), ilSessionStatisticsGUI\current(), ilContSkillAdminGUI\deassignCompetencesConfirm(), ilChatroomAdminSmileyGUI\deleteMultipleObject(), ilMediaCreationGUI\editTitlesAndDescriptions(), ilChatroomSettingsGUI\general(), ilExSubmissionTeamGUI\getAdoptForm(), ilObjStyleSheetGUI\getCloneForm(), ilObjStyleSheetGUI\getCreateForm(), McstImageGalleryGUI\getHTML(), ilObjStyleSheetGUI\getImportForm(), ilPCAMDFormGUI\getPortfolioForm(), ilPortfolioRoleAssignmentGUI\initAssignmentForm(), ilObjNotificationSettingsGUI\initForm(), ilUserProfileInfoSettingsGUI\initForm(), ilObjUserGUI\initForm(), ilMediaCreationGUI\initPoolSelection(), ilBookingGatewayGUI\initSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilChatroomAdminSmileyGUI\initSmiliesEditForm(), ilChatroomAdminSmileyGUI\initSmiliesForm(), ilHistoryTableGUI\initTable(), ilMediaCreationGUI\initUrlForm(), ilContSkillAdminGUI\listProfiles(), ilSessionStatisticsGUI\long(), ilSessionStatisticsGUI\periodic(), ilSessionStatisticsGUI\renderCurrentBasics(), ilSessionStatisticsGUI\short(), ilChatroomAdminSmileyGUI\showDeleteSmileyFormObject(), ilChatroomViewGUI\showNameSelection(), and ilChatroomViewGUI\showRoom().

+ 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 510 of file class.ilCtrl.php.

516 : string {
517 return $this->getTargetUrl(
518 $a_class,
519 $a_fallback_cmd,
520 $a_anchor,
521 $is_async,
522 $has_xml_style,
523 true
524 ) ?? '';
525 }
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 209 of file class.ilCtrl.php.

209 : string
210 {
211 $class_name = get_class($a_gui_object);
212 // @TODO: remove this check once an interface for command classes exists.
213 if (!method_exists($a_gui_object, 'getHTML')) {
214 throw new ilCtrlException("$class_name doesn't implement getHTML().");
215 }
216
217 $isolatad_structure = $this->structure;
218 $isolated_context = $this->context;
219 $isolated_object = $this->exec_object;
220
221 $this->exec_object = $a_gui_object;
222 $this->populateCall($class_name, self::CMD_MODE_HTML);
223 $this->context
224 ->setCmdClass($class_name)
225 ->setCmdMode(self::CMD_MODE_HTML);
226
227 $html = (null !== $a_parameters) ?
228 $a_gui_object->getHTML($a_parameters) :
229 $a_gui_object->getHTML();
230
231 $this->structure = $isolatad_structure;
232 $this->context = $isolated_context;
233 $this->exec_object = $isolated_object;
234
235 return $html;
236 }
object $exec_object

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 453 of file class.ilCtrl.php.

459 : string {
460 return $this->getLinkTargetByClass(
461 $this->getClassByObject($a_gui_obj),
462 $a_cmd,
463 $a_anchor,
464 $is_async,
465 $has_xml_style
466 );
467 }
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\Editor\Components\Page\PageQueryActionHandler\allCommand(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilLMPageObjectGUI\create(), ilContProfileTableGUI\fillRow(), ilContSkillMemberTableGUI\fillRow(), ilCopySelfAssQuestionTableGUI\fillRow(), ILIAS\COPage\Editor\Components\Page\PageQueryActionHandler\getActionsDropDown(), ilObjLearningHistorySettingsGUI\getAdminTabs(), ilObjCommentsSettingsGUI\getAdminTabs(), ilObjNotesSettingsGUI\getAdminTabs(), ilObjPersonalWorkspaceSettingsGUI\getAdminTabs(), ilNoteGUI\getCommentsWidget(), ilContainerFilterAdminGUI\getFieldSelectionForm(), ilLikeGUI\getHTML(), ILIAS\COPage\Editor\Components\Page\PageQueryActionHandler\getMultiLangActions(), ilPCAMDFormGUI\getTemplateForm(), ILIAS\COPage\Editor\Components\Page\PageQueryActionHandler\getTopActions(), ilObjPortfolioAdministrationGUI\initAuthorshipForm(), ilObjLearningHistorySettingsGUI\initForm(), ilObjCommentsSettingsGUI\initForm(), ilObjNotesSettingsGUI\initForm(), ilObjWorkflowEngineGUI\initLocator(), 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 ilChatroomViewGUI\showRoom().

+ 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 
)

◆ getNextClass()

ilCtrl::getNextClass (   $a_gui_class = null)

@inheritDoc

Implements ilCtrlInterface.

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

325 : ?string
326 {
327 if (null === $a_gui_class && null === $this->exec_object) {
328 return '';
329 }
330
331 if (null === $this->context->getPath()) {
332 return '';
333 }
334
335 $next_cid = $this->context->getPath()->getNextCid(
336 $this->getClassByObject($a_gui_class ?? $this->exec_object)
337 );
338
339 if (null !== $next_cid) {
340 return strtolower($this->structure->getObjNameByCid($next_cid) ?? '');
341 }
342
343 return '';
344 }

References getClassByObject().

Referenced by ilBookingProcessGUI\executeCommand(), ilBookingGatewayGUI\executeCommand(), ilBookingParticipantGUI\executeCommand(), ilBookingPreferencesGUI\executeCommand(), ilBookingReservationsGUI\executeCommand(), ilBookingScheduleGUI\executeCommand(), ilExcRandomAssignmentGUI\executeCommand(), ilExcCriteriaGUI\executeCommand(), ilExSubmissionGUI\executeCommand(), ilExSubmissionTeamGUI\executeCommand(), ilExSubmissionTextGUI\executeCommand(), ilGroupAddToGroupActionGUI\executeCommand(), ilGroupUserActionsGUI\executeCommand(), McstImageGalleryGUI\executeCommand(), McstPodcastGUI\executeCommand(), ilPortfolioRoleAssignmentGUI\executeCommand(), ilObjSCORM2004LearningModuleGUI\executeCommand(), ilSurveyRaterGUI\executeCommand(), ilTestSignatureGUI\executeCommand(), ilWikiFunctionsBlockGUI\executeCommand(), ilWikiImportantPagesBlockGUI\executeCommand(), ilWikiStatGUI\executeCommand(), ilSessionStatisticsGUI\executeCommand(), ilBadgeManagementGUI\executeCommand(), ilContainerFilterAdminGUI\executeCommand(), ilPageMultiLangGUI\executeCommand(), ilPageEditorServerAdapterGUI\executeCommand(), ilAchievementsGUI\executeCommand(), ilFormPropertyDispatchGUI\executeCommand(), ilPropertyFormGUI\executeCommand(), ilObjLearningHistorySettingsGUI\executeCommand(), ilLearningHistoryGUI\executeCommand(), ilLTIRouterGUI\executeCommand(), ilMediaCreationGUI\executeCommand(), ilImageMapEditorGUI\executeCommand(), ilNavigationHistoryGUI\executeCommand(), ilNewsForContextBlockGUI\executeCommand(), ilPDNewsBlockGUI\executeCommand(), ilObjCommentsSettingsGUI\executeCommand(), ilObjNotesSettingsGUI\executeCommand(), ilObjNotificationSettingsGUI\executeCommand(), ilObjPersonalWorkspaceSettingsGUI\executeCommand(), ilRatingCategoryGUI\executeCommand(), ilRatingGUI\executeCommand(), ilObjPluginDispatchGUI\executeCommand(), ilDashboardRecommendedContentGUI\executeCommand(), ilRecommendedContentRoleConfigGUI\executeCommand(), ilRepositoryObjectSearchBlockGUI\executeCommand(), ilSkillTreeAdminGUI\executeCommand(), ilObjStyleSheetGUI\executeCommand(), ilTaggingGUI\executeCommand(), ilTaggingSlateContentGUI\executeCommand(), ilDerivedTasksGUI\executeCommand(), and ilObjWorkflowEngineGUI\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 389 of file class.ilCtrl.php.

389 : array
390 {
391 return $this->getParameterArrayByClass($this->getClassByObject($a_gui_obj));
392 }

References getClassByObject(), and getParameterArrayByClass().

+ Here is the call graph for this function:

◆ getParameterArrayByClass()

ilCtrl::getParameterArrayByClass ( string  $a_class)

@inheritDoc

Implements ilCtrlInterface.

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

397 : array
398 {
399 if (null === $this->structure->getClassCidByName($a_class)) {
400 throw new ilCtrlException("Cannot find provided class '$a_class' in the control structure.");
401 }
402
403 $parameters = [];
404 $permanent_parameters = $this->structure->getPermanentParametersByClass($a_class);
405 if (null !== $permanent_parameters) {
406 foreach ($permanent_parameters as $parameter) {
407 $parameters[$parameter] = $this->getQueryParam($parameter);
408 }
409 }
410
411 $temporary_parameters = $this->structure->getTemporaryParametersByClass($a_class);
412 if (null !== $temporary_parameters) {
413 // override existing ones, as temporary parameters
414 // are prioritised over fetched ones.
415 foreach ($temporary_parameters as $key => $value) {
416 $parameters[$key] = $value;
417 }
418 }
419
420 return $parameters;
421 }

References ILIAS\LTI\ToolProvider\$key, and 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 761 of file class.ilCtrl.php.

761 : ?string
762 {
763 return $this->getParentReturnByClass($this->getClassByObject($a_gui_obj));
764 }
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 769 of file class.ilCtrl.php.

769 : ?string
770 {
771 $path = $this->path_factory->find($this->context, $a_class);
772 if (null !== $path->getCidPath()) {
773 foreach ($path->getCidArray() as $cid) {
774 $current_class = $this->structure->getClassNameByCid($cid);
775 $return_target = $this->structure->getReturnTargetByClass($current_class);
776 if (null !== $return_target) {
777 return $return_target;
778 }
779 }
780 }
781
782 return null;
783 }
$path
Definition: ltiservices.php:32

References $path.

◆ getPostCommand()

ilCtrl::getPostCommand ( )
private

Returns the current $_POST command.

Returns
string|null

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

885 : ?string
886 {
887 if ($this->post_parameters->has(self::PARAM_CMD)) {
888 return $this->post_parameters->retrieve(
889 self::PARAM_CMD,
890 $this->refinery->custom()->transformation(
891 static function ($value): ?string {
892 if (!empty($value)) {
893 if (is_array($value)) {
894 // this most likely only works by accident, but
895 // the selected or clicked command button will
896 // always be sent as first array entry. This
897 // should definitely be done differently.
898 return (string) array_key_first($value);
899 }
900
901 return (string) $value;
902 }
903
904 return null;
905 }
906 )
907 );
908 }
909
910 return null;
911 }
static return function(ContainerConfigurator $containerConfigurator)
Definition: basic_rector.php:9

References function, and ILIAS\Repository\refinery().

Referenced by getCmd().

+ Here is the call graph for this function:
+ Here is the caller 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 840 of file class.ilCtrl.php.

840 : ?string
841 {
842 if ($this->get_parameters->has($parameter_name)) {
843 return $this->get_parameters->retrieve(
844 $parameter_name,
845 $this->refinery->to()->string()
846 );
847 }
848
849 return null;
850 }

References ILIAS\Repository\refinery().

Referenced by getCmd(), and 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 788 of file class.ilCtrl.php.

788 : ?string
789 {
790 return $this->context->getRedirectSource();
791 }

◆ getTableCommand()

ilCtrl::getTableCommand ( )
private
Deprecated:

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

855 : ?string
856 {
857 if ($this->post_parameters->has('table_top_cmd')) {
858 return $this->post_parameters->retrieve(
859 'table_top_cmd',
860 $this->refinery->custom()->transformation(function ($item): ?string {
861 return is_array($item) ? key($item) : null;
862 })
863 );
864 }
865 // Button on top of the table
866 if ($this->post_parameters->has('select_cmd2')) {
867 return $this->post_parameters->has('selected_cmd2')
868 ? $this->post_parameters->retrieve('selected_cmd2', $this->refinery->to()->string())
869 : null;
870 }
871 // Button at bottom of the table
872 if ($this->post_parameters->has('select_cmd')) {
873 return $this->post_parameters->has('selected_cmd')
874 ? $this->post_parameters->retrieve('selected_cmd', $this->refinery->to()->string())
875 : null;
876 }
877
878 return null;
879 }

References function, and ILIAS\Repository\refinery().

Referenced by getCmd().

+ Here is the call graph for this function:
+ Here is the caller 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 925 of file class.ilCtrl.php.

932 : ?string {
933 if (empty($a_class)) {
934 throw new ilCtrlException(__METHOD__ . " was provided with an empty class or class-array.");
935 }
936
937 $is_array = is_array($a_class);
938
939 $path = $this->path_factory->find($this->context, $a_class);
940 if (null !== ($exception = $path->getException())) {
941 throw $exception;
942 }
943
944 $base_class = $path->getBaseClass();
945 if (null === $base_class) {
946 throw new ilCtrlException("Cannot find a valid baseclass in the cid path '{$path->getCidPath()}'");
947 }
948
949 $target_url = $this->context->getTargetScript();
950 $target_url = $this->appendParameterString(
951 $target_url,
952 self::PARAM_BASE_CLASS,
953 urlencode($base_class), // encode in case of namespaced classes
954 $is_escaped
955 );
956
957 $cmd_class = ($is_array) ?
958 $a_class[array_key_last($a_class)] :
959 $a_class;
960
961 // only append the cid path and command class params
962 // if they exist.
963 if (null !== $path->getNextCid($base_class)) {
964 $target_url = $this->appendParameterString(
965 $target_url,
966 self::PARAM_CID_PATH,
967 $path->getCidPath(),
968 $is_escaped
969 );
970
971 $target_url = $this->appendParameterString(
972 $target_url,
973 self::PARAM_CMD_CLASS,
974 urlencode($cmd_class), // encode in case of namespaced classes
975 $is_escaped
976 );
977 }
978
979 // if the target url is generated for form actions,
980 // the command must be set to 'post'.
981 if ($is_post) {
982 $target_url = $this->appendParameterString(
983 $target_url,
984 self::PARAM_CMD,
985 self::CMD_POST,
986 $is_escaped
987 );
988 }
989
990 // the actual command is appended as fallback command
991 // for form actions and 'normal' get requests.
992 if (!empty($a_cmd)) {
993 $target_url = $this->appendParameterString(
994 $target_url,
995 ($is_post) ? self::PARAM_CMD_FALLBACK : self::PARAM_CMD,
996 $a_cmd,
997 $is_escaped
998 );
999 }
1000
1001 // collect all parameters of classes within the current
1002 // targets path and append them to the target url.
1003 foreach ($path->getCidArray(SORT_ASC) as $cid) {
1004 $class_name = $this->structure->getClassNameByCid($cid);
1005 if (null === $class_name) {
1006 throw new ilCtrlException("Classname for cid '$cid' in current path cannot be found.");
1007 }
1008
1009 $target_url = $this->appendParameterStringsByClass(
1010 $class_name,
1011 $target_url,
1012 $is_escaped
1013 );
1014 }
1015
1016 // append a csrf token if the command is considered
1017 // unsafe or the link is for form actions.
1018 if (!$this->isCmdSecure($is_post, $cmd_class, $a_cmd)) {
1019 $token = $this->token_repository->getToken();
1020 $target_url = $this->appendParameterString(
1021 $target_url,
1022 self::PARAM_CSRF_TOKEN,
1023 $token->getToken(),
1024 $is_escaped
1025 );
1026 }
1027
1028 if ($is_async) {
1029 $target_url = $this->appendParameterString(
1030 $target_url,
1031 self::PARAM_CMD_MODE,
1032 self::CMD_MODE_ASYNC,
1033 $is_escaped
1034 );
1035 }
1036
1037 if (!empty($a_anchor)) {
1038 $target_url .= "#$a_anchor";
1039 }
1040
1041 return $target_url;
1042 }
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 796 of file class.ilCtrl.php.

796 : void
797 {
798 throw new ilCtrlException(__METHOD__ . " is deprecated and must not be used.");
799 }

◆ isAsynch()

ilCtrl::isAsynch ( )

@inheritDoc

Implements ilCtrlInterface.

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

708 : bool
709 {
710 return $this->context->isAsync();
711 }

Referenced by ilNoteGUI\getCommentsWidget(), ilBlockGUI\getHTMLNew(), 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 1084 of file class.ilCtrl.php.

1084 : bool
1085 {
1086 // if no command is specified, the command is
1087 // considered safe if it's not a POST command.
1088 if (null === $cmd) {
1089 return !$is_post;
1090 }
1091
1092 // if the given command class doesn't exist, the
1093 // command is not considered safe as it might've been
1094 // tampered with.
1095 $obj_name = $this->structure->getObjNameByName($cmd_class);
1096 if (null === $obj_name) {
1097 return false;
1098 }
1099
1100 // if the command class does not yet implement the
1101 // ilCtrlSecurityInterface, the command is considered
1102 // safe if it's not a POST command.
1103 if (!is_a($obj_name, ilCtrlSecurityInterface::class, true)) {
1104 return !$is_post;
1105 }
1106
1107 // the post command is considered safe if it's contained
1108 // in the list of safe post commands.
1109 if ($is_post) {
1110 return in_array($cmd, $this->structure->getSafeCommandsByName($cmd_class), true);
1111 }
1112
1113 // the get command is considered safe if it's not
1114 // contained in the list of unsafe get commands.
1115 return !in_array($cmd, $this->structure->getUnsafeCommandsByName($cmd_class), true);
1116 }

Referenced by getCmd().

+ Here is the caller graph for this function:

◆ lookupClassPath()

ilCtrl::lookupClassPath ( string  $a_class)

@inheritDoc

Implements ilCtrlInterface.

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

669 : string
670 {
671 $path = $this->structure->getRelativePathByName($a_class);
672 if (null === $path) {
673 throw new ilCtrlException("Class '$a_class' cannot be found in the control structure.");
674 }
675
676 return $path;
677 }

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 682 of file class.ilCtrl.php.

682 : ?string
683 {
684 return $this->structure->getObjNameByName($a_class);
685 }

◆ 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 1194 of file class.ilCtrl.php.

1194 : void
1195 {
1196 $obj_name = $this->structure->getObjNameByName($class_name);
1197
1198 $this->stacktrace[] = [
1199 self::PARAM_CMD_CLASS => $obj_name,
1200 self::PARAM_CMD_MODE => $cmd_mode,
1201 self::PARAM_CMD => $this->getCmd(),
1202 ];
1203 }
getCmd(string $fallback_command=null)
@inheritDoc

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 530 of file class.ilCtrl.php.

535 : void {
536 $this->redirectByClass(
537 $this->getClassByObject($a_gui_obj),
538 $a_cmd,
539 $a_anchor,
540 $is_async
541 );
542 }
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(), ilObjItemGroupGUI\afterSave(), ilSkillTreeNodeGUI\afterUpdate(), ilRecommendedContentRoleConfigGUI\assignItem(), ilObjBlogAdministrationGUI\cancel(), ilObjExerciseAdministrationGUI\cancel(), ilObjMediaCastSettingsGUI\cancel(), ilObjPortfolioAdministrationGUI\cancel(), ilObjAwarenessAdministrationGUI\cancel(), ilObjTaggingSettingsGUI\cancel(), ilSkillRootGUI\cancelDelete(), ilObjMediaPoolGUI\cancelSave(), ilInternalLinkGUI\changeLinkType(), ilRecommendedContentRoleConfigGUI\checkPushPermission(), ilPortfolioRoleAssignmentGUI\confirmAssignmentDeletion(), ilContSkillAdminGUI\confirmDeleteSelectedLocalProfiles(), ilContSkillAdminGUI\confirmDeleteSingleLocalProfile(), ilChatroomAdminSmileyGUI\confirmedDeleteMultipleObject(), ilContSkillAdminGUI\confirmRemoveSelectedGlobalProfiles(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilContSkillAdminGUI\confirmRemoveSingleGlobalProfile(), ilBadgeProfileGUI\deactivate(), ilBadgeProfileGUI\deactivateInCard(), ilContSkillAdminGUI\deassignCompetences(), ilContSkillAdminGUI\deassignCompetencesConfirm(), ilChatroomBanGUI\delete(), ilPortfolioRoleAssignmentGUI\deleteAssignments(), ilBasicSkillGUI\deleteLevel(), ilChatroomAdminSmileyGUI\deleteMultipleObject(), ilContSkillAdminGUI\deleteSelectedLocalProfiles(), ilContSkillAdminGUI\deleteSingleLocalProfile(), ilChatroomAdminSmileyGUI\deleteSmileyObject(), ilChatroomAdminViewGUI\executeDefault(), ilChatroomViewGUI\executeDefault(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilChatroomViewGUI\invitePD(), ilSurveyParticipantsGUI\inviteUsers(), ilContSkillAdminGUI\publishAssignments(), ilEditClipboardGUI\remove(), ilContSkillAdminGUI\removeSelectedGlobalProfiles(), ilContSkillAdminGUI\removeSelectedSkill(), ilContSkillAdminGUI\removeSingleGlobalProfile(), ilInternalLinkGUI\resetLinkList(), ilObjMediaPoolGUI\returnFromItem(), ilChatroomCreateGUI\save(), ilObjNotificationSettingsGUI\save(), ilTaxMDGUI\save(), ilUserProfileInfoSettingsGUI\save(), ilPortfolioRoleAssignmentGUI\saveAssignment(), ilObjPortfolioAdministrationGUI\saveAuthorship(), ilChatroomAdminViewGUI\saveClientSettings(), ilContSkillAdminGUI\saveCompetenceAssignment(), ilContainerFilterAdminGUI\saveFields(), ilBookingPreferencesGUI\savePreferences(), ilUserPrivacySettingsGUI\savePrivacySettings(), ilContSkillAdminGUI\saveSelectedProfile(), ilContSkillAdminGUI\saveSelectedSkill(), ilBookingGatewayGUI\saveSettings(), ilContSkillAdminGUI\saveSettings(), ilObjLearningHistorySettingsGUI\saveSettings(), ilObjCommentsSettingsGUI\saveSettings(), ilObjNotesSettingsGUI\saveSettings(), ilObjDashboardSettingsGUI\saveViewSettings(), ilExerciseManagementGUI\selectAssignmentObject(), ilExerciseManagementGUI\selectParticipantObject(), ilMediaCreationGUI\selectPool(), ilInternalLinkGUI\setMedPoolFolder(), ilBookingGatewayGUI\show(), and ilObjHelpSettingsGUI\uploadHelpFile().

+ 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 547 of file class.ilCtrl.php.

552 : void {
553 $this->redirectToURL(
555 $a_class,
556 $a_cmd,
557 $a_anchor,
558 $is_async
559 )
560 );
561 }
redirectToURL(string $target_url)
@inheritDoc

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

+ Here is the caller graph for this function:

◆ redirectToURL()

ilCtrl::redirectToURL ( string  $target_url)

@inheritDoc

Implements ilCtrlInterface.

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

566 : void
567 {
568 // prepend the ILIAS HTTP path if it wasn't already.
569 if (defined("ILIAS_HTTP_PATH") &&
570 strpos($target_url, "://") === false &&
571 strpos($target_url, "/") !== 0
572 ) {
573 $target_url = ILIAS_HTTP_PATH . "/" . $target_url;
574 }
575
576 // this line can be dropped after discussion with TB or JF,
577 // it keeps the functionality of UI plugin hooks alive.
578 $target_url = $this->modifyUrlWithPluginHooks($target_url);
579
580 // initialize http response object
581 $response = new Response();
582
583 // there's an exceptional case for asynchronous file uploads
584 // where a json response is delivered.
585 if ('application/json' === $this->server_request->getHeaderLine('Accept')) {
586 try {
587 $body = Streams::ofString(
588 json_encode(
589 [
590 'redirect_url' => $target_url,
591 'success' => true,
592 'message' => 'called redirect after asynchronous file-upload request.',
593 ],
594 JSON_THROW_ON_ERROR
595 )
596 );
597 } catch (Throwable $exception) {
598 $body = Streams::ofString($exception->getMessage());
599 }
600
601 $response = $response->withBody($body);
602 } else {
603 $response = $response->withAddedHeader('Location', $target_url);
604 }
605
606 // manually trigger session_write_close() due to exceptions stored
607 // in the ILIAS database, otherwise this method is called by exit()
608 // which leads to the exceptions not being written to the database.
609 session_write_close();
610
611 try {
612 $this->response_sender->sendResponse($response);
613 } catch (ResponseSendingException $e) {
614 header("Location: $target_url");
615 if ('application/json' === $this->server_request->getHeaderLine('Accept')) {
616 $content = (null !== $response->getBody()) ?
617 $response->getBody()->getContents() :
618 [];
619
620 echo json_encode($content, JSON_THROW_ON_ERROR);
621 }
622 } catch (Throwable $t) {
623 header("Location: $target_url");
624 echo $t->getMessage();
625 }
626
627 exit;
628 }
exit
Definition: login.php:28
$response

References Vendor\Package\$e, $response, and exit.

◆ returnToParent()

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

@inheritDoc

Implements ilCtrlInterface.

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

738 : void
739 {
740 $class_name = $this->getClassByObject($a_gui_obj);
741 $target_url = $this->getParentReturnByClass($class_name);
742
743 // append redirect source to target url.
744 $target_url = $this->appendParameterString(
745 $target_url,
746 self::PARAM_REDIRECT,
747 $class_name
748 );
749
750 // append the provided anchor if necessary.
751 if (null !== $a_anchor) {
752 $target_url .= "#$a_anchor";
753 }
754
755 $this->redirectToURL($target_url);
756 }

Referenced by ilMediaCreationGUI\cancel(), ilMediaCreationGUI\cancelCreate(), ilNewsForContextBlockGUI\cancelSettings(), ilDashboardRecommendedContentGUI\makeFavourite(), ilDashboardRecommendedContentGUI\remove(), 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 349 of file class.ilCtrl.php.

349 : void
350 {
351 $this->saveParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter);
352 }
saveParameterByClass(string $a_class, $a_parameter)
@inheritDoc

References getClassByObject(), and saveParameterByClass().

Referenced by ilContSkillAdminGUI\assignCompetences(), ilSurveySkillGUI\assignSkillToQuestion(), ilMediaCreationGUI\editTitlesAndDescriptions(), ilNewsTimelineGUI\executeCommand(), ilBookingGatewayGUI\initPool(), ilChatroomAdminSmileyGUI\initSmiliesEditForm(), 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 357 of file class.ilCtrl.php.

357 : void
358 {
359 if (!empty($a_parameter)) {
360 if (is_array($a_parameter)) {
361 foreach ($a_parameter as $parameter) {
362 $this->structure->setPermanentParameterByClass($a_class, $parameter);
363 }
364 } else {
365 $this->structure->setPermanentParameterByClass($a_class, $a_parameter);
366 }
367 }
368 }

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

+ Here is the caller graph for this function:

◆ setCmd()

ilCtrl::setCmd ( ?string  $a_cmd)

@inheritDoc

Implements ilCtrlInterface.

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

289 : void
290 {
291 if (!empty($a_cmd)) {
292 $this->context->setCmd($a_cmd);
293 } else {
294 $this->context->setCmd(null);
295 }
296 }

Referenced by ilChatroomInfoGUI\executeDefault(), and ilObjectCopyGUI\keepObjectsInClipboard().

+ Here is the caller graph for this function:

◆ setCmdClass()

ilCtrl::setCmdClass (   $a_cmd_class)

@inheritDoc

Implements ilCtrlInterface.

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

313 : void
314 {
315 if (!empty($a_cmd_class)) {
316 $this->context->setCmdClass($a_cmd_class);
317 } else {
318 $this->context->setCmdClass(null);
319 }
320 }

◆ setContextObject()

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

@inheritDoc

Implements ilCtrlInterface.

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

633 : void
634 {
635 // cannot process object without object type.
636 if (!empty($obj_type)) {
637 $this->context->setObjId($obj_id);
638 $this->context->setObjType($obj_type);
639 }
640 }

◆ setParameter()

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

@inheritDoc

Implements ilCtrlInterface.

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

373 : void
374 {
375 $this->setParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter, $a_value);
376 }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc

References getClassByObject(), and setParameterByClass().

Referenced by ilObjWikiGUI\addPagesSubTabs(), ilObjWikiGUI\addPageTabs(), ilPCDataTableGUI\afterCreation(), ilObjMediaPoolGUI\cancelFolderUpdate(), ilInternalLinkGUI\changeLinkType(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilLMPageObjectGUI\create(), ilSkillTreeNodeGUI\deleteNodes(), ilNoteGUI\deleteNote(), ilRatingCategoryGUI\edit(), ilGroupAddToGroupActionGUI\executeCommand(), ilBookingSchedulesTableGUI\fillRow(), ilAssignmentsPerParticipantTableGUI\fillRow(), ilExerciseVerificationTableGUI\fillRow(), ilParticipantsPerAssignmentTableGUI\fillRow(), ilExcCriteriaCatalogueTableGUI\fillRow(), ilExcCriteriaTableGUI\fillRow(), ilLMGlossaryTableGUI\fillRow(), ilLMMenuItemsTableGUI\fillRow(), ilSurveySkillAssignmentTableGUI\fillRow(), ilSurveySkillTableGUI\fillRow(), ilSettingsTemplateTableGUI\fillRow(), ilBadgeImageTemplateTableGUI\fillRow(), ilObjectBadgeTableGUI\fillRow(), ilContProfileTableGUI\fillRow(), ilContSkillMemberTableGUI\fillRow(), ilCopySelfAssQuestionTableGUI\fillRow(), ilPageLayoutTableGUI\fillRow(), ilHelpModuleTableGUI\fillRow(), ilWorkspaceAccessTableGUI\fillRow(), ilRatingCategoryTableGUI\fillRow(), ilNewItemGroupTableGUI\fillRow(), ilSkillLevelTableGUI\fillRow(), ilSkillLevelProfileAssignmentTableGUI\fillRow(), ilSkillProfileTableGUI\fillRow(), ilStyleMediaQueryTableGUI\fillRow(), ilTableTemplatesTableGUI\fillRow(), ilStyleColorTableGUI\fillRow(), ilTaxonomyListTableGUI\fillRow(), ilTaxonomyTableGUI\fillRow(), ILIAS\COPage\Editor\Components\Page\PageQueryActionHandler\getActionsDropDown(), ilNoteGUI\getCommentsHTML(), ilNoteGUI\getCommentsWidget(), ilLikeGUI\getHTML(), ILIAS\COPage\Editor\Components\Page\PageQueryActionHandler\getMultiLangActions(), ilMaterialExplorer\getNodeHref(), ilNoteGUI\getNotesHTML(), ilInternalLinkGUI\init(), ilObjWorkflowEngineGUI\initLocator(), ilBookingGatewayGUI\initPool(), ilSkillProfileGUI\initProfileForm(), ilChatroomAdminSmileyGUI\initSmiliesEditForm(), ilChatroomAdminSmileyGUI\initSmiliesForm(), ilChatroomViewGUI\invitePD(), ilExAssignmentEditorGUI\listAssignmentsObject(), ilMediaCreationGUI\listPoolItems(), ilPCContentIncludeGUI\poolSelection(), ilLearningHistoryGUI\renderButton(), ilInternalLinkGUI\resetLinkList(), ilObjMediaPoolGUI\returnFromItem(), ilChatroomCreateGUI\save(), ilExerciseManagementGUI\selectAssignmentObject(), ilExerciseManagementGUI\selectParticipantObject(), ilPCContentIncludeGUI\selectPool(), ilPCQuestionGUI\selectPool(), ilMediaCreationGUI\selectPool(), ilInternalLinkGUI\setMedPoolFolder(), and ilRepositorySelectorInputGUI\showRepositorySelection().

+ 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 381 of file class.ilCtrl.php.

381 : void
382 {
383 $this->structure->setTemporaryParameterByClass($a_class, $a_parameter, $a_value);
384 }

Referenced by ilObjCmiXapiVerificationGUI\_goto(), ilObjCourseReferenceGUI\_goto(), ilObjLTIConsumerVerificationGUI\_goto(), ilObjQuestionPoolGUI\_goto(), ilObjCmiXapiGUI\_goto(), ilObjCourseVerificationGUI\_goto(), ilLMPageObjectGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilObjWikiGUI\_goto(), ilObjWorkspaceFolderGUI\_goto(), ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObjectGUI\_gotoSharedWorkspaceNode(), ilBlockGUI\addRepoCommands(), ilBasicSkillGUI\afterSave(), ilBasicSkillTemplateGUI\afterSave(), ilSkillTemplateReferenceGUI\afterSave(), ilObjSkillTreeGUI\editSkills(), ilObjSkillManagementGUI\editSkillTemplates(), ilObjSkillTreeGUI\editSkillTemplates(), ilBookingParticipantsTableGUI\fillRow(), ilLinksTableGUI\fillRow(), ilFoundUsersTableGUI\fillRow(), ilContProfileTableGUI\fillRow(), ilHistoryTableGUI\fillRow(), ilSkillCatTableGUI\fillRow(), ilPersonalSkillTableGUI\fillRow(), ILIAS\Skill\Tree\SkillTreeTableGUI\fillRow(), ilContentStylesTableGUI\fillRow(), ilObjLearningSequenceGUI\forwardByClass(), ilChatroomSettingsGUI\general(), ILIAS\LearningModule\Menu\ilLMMenuGUI\getEntries(), McstImageGalleryGUI\getHTML(), McstPodcastGUI\getHTML(), ilRepositorySelector2InputGUI\getHTML(), ilExAssignmentInfo\getInstructionFileInfo(), ilNoteGUI\getItemForNote(), ilNewsForContextBlockGUI\getJSEnabler(), ilMediaPoolExplorerGUI\getNodeHref(), ilPCFileItemFileSelectorGUI\getNodeHref(), ilPoolSelectorGUI\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(), ilKSDocumentationGotoLink\redirectWithGotoLink(), ilFavouritesListGUI\render(), ilRepositorySelector2InputGUI\render(), setParameter(), ilObjSkillTreeGUI\showLocator(), ilChatroomKickGUI\sub(), 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 716 of file class.ilCtrl.php.

716 : void
717 {
718 $this->setReturnByClass($this->getClassByObject($a_gui_obj), $a_cmd);
719 }
setReturnByClass(string $a_class, string $a_cmd=null)
@inheritDoc

Referenced by ilBookingGatewayGUI\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 724 of file class.ilCtrl.php.

724 : void
725 {
726 $this->structure->setReturnTargetByClass(
727 $a_class,
729 $a_class,
730 $a_cmd
731 )
732 );
733 }

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 700 of file class.ilCtrl.php.

700 : void
701 {
702 $this->context->setTargetScript($a_target_script);
703 }

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

+ Here is the caller graph for this function:

Field Documentation

◆ $component_factory

ilComponentFactory ilCtrl::$component_factory
private

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

Referenced by __construct().

◆ $context

ilCtrlContextInterface ilCtrl::$context
private

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

Referenced by __construct(), and getHTML().

◆ $exec_object

object ilCtrl::$exec_object = null
private

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

Referenced by getHTML().

◆ $get_parameters

RequestWrapper ilCtrl::$get_parameters
private

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

Referenced by __construct().

◆ $path_factory

ilCtrlPathFactoryInterface ilCtrl::$path_factory
private

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

Referenced by __construct().

◆ $post_parameters

RequestWrapper ilCtrl::$post_parameters
private

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

Referenced by __construct().

◆ $query_parser

ilCtrlQueryParserInterface ilCtrl::$query_parser
private

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

Referenced by __construct().

◆ $refinery

Refinery ilCtrl::$refinery
private

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

Referenced by __construct().

◆ $response_sender

ResponseSenderStrategy ilCtrl::$response_sender
private

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

Referenced by __construct().

◆ $server_request

ServerRequestInterface ilCtrl::$server_request
private

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

Referenced by __construct().

◆ $stacktrace

array ilCtrl::$stacktrace = []
private

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

◆ $structure

ilCtrlStructureInterface ilCtrl::$structure
private

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

Referenced by __clone(), __construct(), and getHTML().

◆ $token_repository

ilCtrlTokenRepositoryInterface ilCtrl::$token_repository
private

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

Referenced by __construct().


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