ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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 1044 of file class.ilCtrl.php.

1048 : string {
1049 $class_parameters = $this->getParameterArrayByClass($class_name);
1050 if (!empty($class_parameters)) {
1051 foreach ($class_parameters as $key => $value) {
1052 $target_url = $this->appendParameterString(
1053 $target_url,
1054 $key,
1055 $value,
1056 $is_escaped
1057 );
1058 }
1059 }
1060
1061 return $target_url;
1062 }
getParameterArrayByClass(string $a_class)
@inheritDoc

◆ attachObserver()

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

@inheritDoc

Implements ilCtrlInterface.

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

694 : void
695 {
696 $this->subject->attach($observer, $event);
697 }

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

661 : bool
662 {
663 $class_cid = $this->structure->getClassCidByName($gui_class);
664 if (null === $class_cid) {
665 return false;
666 }
667
668 return strpos(
669 $this->context->getPath()->getCidPath() ?? '',
670 $class_cid
671 ) !== false;
672 }

◆ clearParameterByClass()

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

@inheritDoc

Implements ilCtrlInterface.

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

302 : void
303 {
304 $this->structure->removeSingleParameterByClass($a_class, $a_parameter);
305 }

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

283 : void
284 {
285 $this->clearParametersByClass($this->getClassByObject($a_gui_obj));
286 }
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 291 of file class.ilCtrl.php.

291 : void
292 {
293 // apparently permanent parameters should not be removable,
294 // therefore the line below stays commented:
295 // $this->structure->removePermanentParametersByClass($a_class);
296 $this->structure->removeTemporaryParametersByClass($a_class);
297 }

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

702 : void
703 {
704 $this->subject->detach($observer, $event);
705 }

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

518 : array
519 {
520 return $this->stacktrace;
521 }
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 1129 of file class.ilCtrl.php.

1129 : string
1130 {
1131 return (is_object($object)) ? get_class($object) : $object;
1132 }

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

547 : string
548 {
549 $path_info = pathinfo($a_class_path);
550
551 return substr($path_info['basename'], 6, -4);
552 }

◆ 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 $this->subject->notify(ilCtrlEvent::COMMAND_DETERMINATION, $command);
162 $this->command = $command;
163
164 return $command ?? ''; // remove null-coalesce
165 }
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 170 of file class.ilCtrl.php.

170 : ?string
171 {
172 if (null !== ($cmd_class = $this->context->getCmdClass())) {
173 return strtolower($this->structure->getObjNameByName($cmd_class));
174 }
175
176 return '';
177 }

◆ getContextObjId()

ilCtrl::getContextObjId ( )

@inheritDoc

Implements ilCtrlInterface.

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

502 : ?int
503 {
504 return $this->context->getObjId();
505 }

◆ getContextObjType()

ilCtrl::getContextObjType ( )

@inheritDoc

Implements ilCtrlInterface.

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

510 : ?string
511 {
512 return $this->context->getObjType();
513 }

◆ getCurrentClassPath()

ilCtrl::getCurrentClassPath ( )

@inheritDoc

Implements ilCtrlInterface.

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

677 : array
678 {
679 if (null === $this->context->getPath()->getCidPath()) {
680 return [];
681 }
682
683 $class_paths = [];
684 foreach ($this->context->getPath()->getCidArray(SORT_ASC) as $cid) {
685 $class_paths[] = $this->structure->getObjNameByCid($cid);
686 }
687
688 return $class_paths;
689 }

◆ getDeterminedCommand()

ilCtrl::getDeterminedCommand ( )
protected

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

707 : ?string
708 {
709 // retrieve $_GET and $_POST parameters.
710 $post_command = $this->getPostCommand();
711 $get_command = $this->getQueryParam(self::PARAM_CMD);
712 $table_command = $this->getTableCommand();
713
714 $is_post = (self::CMD_POST === $get_command);
715
716 // if the $_GET command is 'post', either the $_POST
717 // command or $_GETs fallback command is used.
718 // for now, the table command is used as fallback as well,
719 // but this will be removed once the implementation of
720 // table actions change.
721 $command = ($is_post) ?
722 $post_command ?? $table_command ?? $this->getQueryParam(self::PARAM_CMD_FALLBACK) :
723 $get_command;
724
725 // override the command that has been set during a
726 // request via ilCtrl::setCmd().
727 $context_command = $this->context->getCmd();
728 if (null !== $context_command && self::CMD_POST !== $context_command) {
729 $command = $context_command;
730 }
731
732 if (null === $command) {
733 return $command;
734 }
735
736 // if the command is for post requests, or the command
737 // is not considered safe, the csrf-validation must pass.
738 $cmd_class = $this->context->getCmdClass();
739 if (null !== $cmd_class && !$this->isCmdSecure($is_post, $cmd_class, $command)) {
740 $stored_token = $this->token_repository->getToken();
741 $sent_token = $this->getQueryParam(self::PARAM_CSRF_TOKEN);
742
743 if (null !== $sent_token && $stored_token->verifyWith($sent_token)) {
744 return $command;
745 }
746 return null;
747 }
748
749 return $command;
750 }
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 348 of file class.ilCtrl.php.

354 : string {
355 return $this->getFormActionByClass(
356 $this->getClassByObject($a_gui_obj),
357 $a_fallback_cmd,
358 $a_anchor,
359 $is_async,
360 $has_xml_style
361 );
362 }
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(), ilMediaCreationGUI\initUrlForm(), 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 367 of file class.ilCtrl.php.

373 : string {
374 return $this->getTargetUrl(
375 $a_class,
376 $a_fallback_cmd,
377 $a_anchor,
378 $is_async,
379 $has_xml_style,
380 true
381 ) ?? '';
382 }
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

References $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 310 of file class.ilCtrl.php.

316 : string {
317 return $this->getLinkTargetByClass(
318 $this->getClassByObject($a_gui_obj),
319 $a_cmd,
320 $a_anchor,
321 $is_async,
322 $has_xml_style
323 );
324 }
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 329 of file class.ilCtrl.php.

335 : string {
336 return $this->getTargetUrl(
337 $a_class,
338 $a_cmd,
339 $a_anchor,
340 $is_async,
341 $has_xml_style
342 ) ?? '';
343 }

Referenced by ilBlockGUI\addRepoCommands(), ilContainerSkillGUI\addTabs(), ILIAS\User\StaticURLHandler\buildChangeEmailUrl(), ILIAS\Contact\URL\StaticUrlHandler\buildProfileUrl(), ILIAS\User\StaticURLHandler\buildProfileUrl(), ILIAS\Test\StaticURLHandler\buildQuestionURL(), ilExAssTypeUploadGUI\buildSubmissionPropertiesAndActions(), ilExAssTypeWikiTeamGUI\buildSubmissionPropertiesAndActions(), ilSkillProfileGUI\createLocal(), ilBookingParticipantsTableGUI\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(), ILIAS\User\StaticURLHandler\getRedirectToOtherComponentsOrProfile(), ilNoteGUI\getShyButton(), ilBookingPreferencesGUI\listBookingResults(), 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 182 of file class.ilCtrl.php.

182 : ?string
183 {
184 if (null === $a_gui_class && null === $this->exec_object) {
185 return '';
186 }
187
188 if (null === $this->context->getPath()) {
189 return '';
190 }
191
192 $next_cid = $this->context->getPath()->getNextCid(
193 $this->getClassByObject($a_gui_class ?? $this->exec_object)
194 );
195
196 if (null !== $next_cid) {
197 return strtolower($this->structure->getObjNameByCid($next_cid) ?? '');
198 }
199
200 return '';
201 }

References getClassByObject().

Referenced by ilSessionStatisticsGUI\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(), 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 246 of file class.ilCtrl.php.

246 : array
247 {
248 return $this->getParameterArrayByClass($this->getClassByObject($a_gui_obj));
249 }

References getClassByObject(), and getParameterArrayByClass().

+ Here is the call graph for this function:

◆ getParameterArrayByClass()

ilCtrl::getParameterArrayByClass ( string  $a_class)

@inheritDoc

Implements ilCtrlInterface.

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

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

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

618 : ?string
619 {
620 return $this->getParentReturnByClass($this->getClassByObject($a_gui_obj));
621 }
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 626 of file class.ilCtrl.php.

626 : ?string
627 {
628 $path = $this->path_factory->find($this->context, $a_class);
629 if (null !== $path->getCidPath()) {
630 foreach ($path->getCidArray() as $cid) {
631 $current_class = $this->structure->getClassNameByCid($cid);
632 $return_target = $this->structure->getReturnTargetByClass($current_class);
633 if (null !== $return_target) {
634 return $return_target;
635 }
636 }
637 }
638
639 return null;
640 }
$path
Definition: ltiservices.php:30

References $path.

◆ getPostCommand()

ilCtrl::getPostCommand ( )
private

Returns the current $_POST command.

Returns
string|null

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

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

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

758 : ?string
759 {
760 if ($this->get_parameters->has($parameter_name)) {
761 return $this->get_parameters->retrieve(
762 $parameter_name,
763 $this->refinery->to()->string()
764 );
765 }
766
767 return null;
768 }

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

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

◆ getTableCommand()

ilCtrl::getTableCommand ( )
private
Deprecated:

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

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

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

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

◆ insertCtrlCalls()

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

@inheritDoc

Implements ilCtrlInterface.

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

653 : void
654 {
655 throw new ilCtrlException(__METHOD__ . " is deprecated and must not be used.");
656 }

◆ isAsynch()

ilCtrl::isAsynch ( )

@inheritDoc

Implements ilCtrlInterface.

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

565 : bool
566 {
567 return $this->context->isAsync();
568 }

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

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

◆ lookupClassPath()

ilCtrl::lookupClassPath ( string  $a_class)

@inheritDoc

Implements ilCtrlInterface.

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

526 : string
527 {
528 $path = $this->structure->getRelativePathByName($a_class);
529 if (null === $path) {
530 throw new ilCtrlException("Class '$a_class' cannot be found in the control structure.");
531 }
532
533 return $path;
534 }

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

539 : ?string
540 {
541 return $this->structure->getObjNameByName($a_class);
542 }

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

1112 : void
1113 {
1114 $obj_name = $this->structure->getObjNameByName($class_name);
1115
1116 $this->stacktrace[] = [
1117 self::PARAM_CMD_CLASS => $obj_name,
1118 self::PARAM_CMD_MODE => $cmd_mode,
1119 self::PARAM_CMD => $this->getDeterminedCommand(),
1120 ];
1121 }

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

392 : void {
393 $this->redirectByClass(
394 $this->getClassByObject($a_gui_obj),
395 $a_cmd,
396 $a_anchor,
397 $is_async
398 );
399 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

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

409 : void {
410 $this->redirectToURL(
412 $a_class,
413 $a_cmd,
414 $a_anchor,
415 $is_async
416 )
417 );
418 }
redirectToURL(string $target_url)
@inheritDoc

Referenced by ilObjCmiXapiVerificationGUI\_goto(), ilObjCourseReferenceGUI\_goto(), ilObjLTIConsumerVerificationGUI\_goto(), ilObjCmiXapiGUI\_goto(), ilObjCourseVerificationGUI\_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(), 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 423 of file class.ilCtrl.php.

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

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

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

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

206 : void
207 {
208 $this->saveParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter);
209 }
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 214 of file class.ilCtrl.php.

214 : void
215 {
216 if (!empty($a_parameter)) {
217 if (is_array($a_parameter)) {
218 foreach ($a_parameter as $parameter) {
219 $this->structure->setPermanentParameterByClass($a_class, $parameter);
220 }
221 } else {
222 $this->structure->setPermanentParameterByClass($a_class, $a_parameter);
223 }
224 }
225 }

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

490 : void
491 {
492 // cannot process object without object type.
493 if (!empty($obj_type)) {
494 $this->context->setObjId($obj_id);
495 $this->context->setObjType($obj_type);
496 }
497 }

◆ setParameter()

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

@inheritDoc

Implements ilCtrlInterface.

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

230 : void
231 {
232 $this->setParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter, $a_value);
233 }
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(), 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 238 of file class.ilCtrl.php.

238 : void
239 {
240 $this->structure->setTemporaryParameterByClass($a_class, $a_parameter, $a_value);
241 }

Referenced by ilObjCmiXapiVerificationGUI\_goto(), ilObjCourseReferenceGUI\_goto(), ilObjLTIConsumerVerificationGUI\_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(), ILIAS\User\StaticURLHandler\buildChangeEmailUrl(), ILIAS\Test\StaticURLHandler\buildQuestionURL(), ilExAssTypeWikiTeamGUI\buildSubmissionPropertiesAndActions(), ilContSkillAdminGUI\confirmDeleteSingleLocalProfile(), ilContSkillAdminGUI\confirmRemoveSingleGlobalProfile(), ilObjSkillTreeGUI\editSkills(), ilBookingParticipantsTableGUI\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 573 of file class.ilCtrl.php.

573 : void
574 {
575 $this->setReturnByClass($this->getClassByObject($a_gui_obj), $a_cmd);
576 }
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 581 of file class.ilCtrl.php.

581 : void
582 {
583 $this->structure->setReturnTargetByClass(
584 $a_class,
586 $a_class,
587 $a_cmd
588 )
589 );
590 }

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

557 : void
558 {
559 $this->context->setTargetScript($a_target_script);
560 }

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: