ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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)
 
 forwardCommand (object $a_gui_object)
 
 getHTML (object $a_gui_object, ?array $a_parameters=null)
 
 getCmd (?string $fallback_command=null)
 
 getCmdClass ()
 
 getNextClass ($a_gui_class=null)
 
 saveParameter (object $a_gui_obj, $a_parameter)
 
 saveParameterByClass (string $a_class, $a_parameter)
 
 setParameter (object $a_gui_obj, string $a_parameter, $a_value)
 
 setParameterByClass (string $a_class, string $a_parameter, $a_value)
 
 getParameterArray (object $a_gui_obj)
 
 getParameterArrayByClass (string $a_class)
 
 clearParameters (object $a_gui_obj)
 
 clearParametersByClass (string $a_class)
 
 clearParameterByClass (string $a_class, string $a_parameter)
 
 getLinkTarget (object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 
 getLinkTargetByClass ( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 
 getFormAction (object $a_gui_obj, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 
 getFormActionByClass ( $a_class, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 
 redirect (object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
 
 redirectByClass ( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
 
 redirectToURL (string $target_url)
 
 setContextObject (int $obj_id, string $obj_type)
 
 getContextObjId ()
 
 getContextObjType ()
 
 getCallHistory ()
 
 lookupClassPath (string $a_class)
 
 lookupOriginalClassName (string $a_class)
 
 getClassForClasspath (string $a_class_path)
 
 setTargetScript (string $a_target_script)
 
 isAsynch ()
 
 setReturn (object $a_gui_obj, ?string $a_cmd=null)
 
 setReturnByClass (string $a_class, ?string $a_cmd=null)
 
 returnToParent (object $a_gui_obj, ?string $a_anchor=null)
 
 getParentReturn (object $a_gui_obj)
 
 getParentReturnByClass (string $a_class)
 
 getRedirectSource ()
 
 insertCtrlCalls ($a_parent, $a_child, string $a_comp_prefix)
 
 checkCurrentPathForClass (string $gui_class)
 
 getCurrentClassPath ()
 
 attachObserver (ilCtrlObserver $observer, ilCtrlEvent $event=ilCtrlEvent::ALL)
 
 detachObserver (ilCtrlObserver $observer, ilCtrlEvent $event=ilCtrlEvent::ALL)
 

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

References $structure.

64  {
65  $this->structure = clone $this->structure;
66  }
$structure
TOTAL 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 1049 of file class.ilCtrl.php.

References $url, getParameterArrayByClass(), and ILIAS\Repository\refinery().

Referenced by getTargetUrl().

1053  : string {
1054  $class_parameters = $this->getParameterArrayByClass($class_name);
1055  if (!empty($class_parameters)) {
1056  foreach ($class_parameters as $key => $value) {
1057  $target_url = $this->appendParameterString(
1058  $target_url,
1059  $key,
1060  $value,
1061  $is_escaped
1062  );
1063  }
1064  }
1065 
1066  return $target_url;
1067  }
getParameterArrayByClass(string $a_class)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ attachObserver()

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

Implements ilCtrlInterface.

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

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

◆ callBaseClass()

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

Implements ilCtrlInterface.

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

References forwardCommand(), and null.

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  }
forwardCommand(object $a_gui_object)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ checkCurrentPathForClass()

ilCtrl::checkCurrentPathForClass ( string  $gui_class)

Implements ilCtrlInterface.

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

References null.

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

◆ clearParameterByClass()

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

Implements ilCtrlInterface.

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

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

308  : void
309  {
310  $this->structure->removeSingleParameterByClass($a_class, $a_parameter);
311  }
+ Here is the caller graph for this function:

◆ clearParameters()

ilCtrl::clearParameters ( object  $a_gui_obj)

Implements ilCtrlInterface.

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

References clearParametersByClass(), and getClassByObject().

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

◆ clearParametersByClass()

ilCtrl::clearParametersByClass ( string  $a_class)

Implements ilCtrlInterface.

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

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

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

◆ detachObserver()

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

Implements ilCtrlInterface.

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

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

◆ forwardCommand()

ilCtrl::forwardCommand ( object  $a_gui_object)

Implements ilCtrlInterface.

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

References populateCall().

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

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  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
populateCall(string $class_name, string $cmd_mode)
Helper function that populates a call in the current stacktrace.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCallHistory()

ilCtrl::getCallHistory ( )

Implements ilCtrlInterface.

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

References $stacktrace.

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

◆ getClassByObject()

ilCtrl::getClassByObject (   $object)
private

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

Parameters
object | string$object
Returns
string

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

Referenced by clearParameters(), getFormAction(), getLinkTarget(), getNextClass(), getParameterArray(), getParentReturn(), redirect(), returnToParent(), saveParameter(), setParameter(), and setReturn().

1134  : string
1135  {
1136  return (is_object($object)) ? get_class($object) : $object;
1137  }
+ Here is the caller graph for this function:

◆ getClassForClasspath()

ilCtrl::getClassForClasspath ( string  $a_class_path)

Implements ilCtrlInterface.

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

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

◆ getCmd()

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

Implements ilCtrlInterface.

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

References $command, getDeterminedCommand(), and null.

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

158  : ?string
159  {
160  $command = $this->getDeterminedCommand() ?? $fallback_command;
161  if (null !== $this->command && $command === $this->command) {
162  // don't broadcast command determination event on consecutive
163  // method calls.
164  return $command;
165  }
166 
167  $this->subject->notify(ilCtrlEvent::COMMAND_DETERMINATION, $command);
168  $this->command = $command;
169 
170  return $command ?? ''; // remove null-coalesce
171  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getDeterminedCommand()
string $command
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCmdClass()

ilCtrl::getCmdClass ( )

Implements ilCtrlInterface.

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

References null.

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

◆ getContextObjId()

ilCtrl::getContextObjId ( )

Implements ilCtrlInterface.

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

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

◆ getContextObjType()

ilCtrl::getContextObjType ( )

Implements ilCtrlInterface.

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

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

◆ getCurrentClassPath()

ilCtrl::getCurrentClassPath ( )

Implements ilCtrlInterface.

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

References null.

Referenced by ilObjGlossaryGUI\showTaxonomy(), and ilObjTaxonomyGUI\showTree().

683  : array
684  {
685  if (null === $this->context->getPath()->getCidPath()) {
686  return [];
687  }
688 
689  $class_paths = [];
690  foreach ($this->context->getPath()->getCidArray(SORT_ASC) as $cid) {
691  $class_paths[] = $this->structure->getObjNameByCid($cid);
692  }
693 
694  return $class_paths;
695  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getDeterminedCommand()

ilCtrl::getDeterminedCommand ( )
protected

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

References $command, getPostCommand(), getQueryParam(), getTableCommand(), isCmdSecure(), and null.

Referenced by getCmd(), and populateCall().

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

Implements ilCtrlInterface.

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

References getClassByObject(), and getFormActionByClass().

Referenced by ilBookingBulkCreationTableGUI\__construct(), ilExAssignmentTeamLogTableGUI\__construct(), ilParticipantsPerAssignmentTableGUI\__construct(), ilFeedbackConfirmationTable2GUI\__construct(), ILIAS\Style\Content\CharacteristicTableGUI\__construct(), ilPortfolioRoleAssignmentGUI\confirmAssignmentDeletion(), ilContSkillAdminGUI\confirmDeleteSelectedLocalProfiles(), ilContSkillAdminGUI\confirmDeleteSingleLocalProfile(), ilContSkillAdminGUI\confirmRemoveSelectedGlobalProfiles(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilContSkillAdminGUI\confirmRemoveSingleGlobalProfile(), ilContSkillAdminGUI\deassignCompetencesConfirm(), ilObjStyleSheetGUI\deleteObject(), ilMediaCreationGUI\editTitlesAndDescriptions(), ilObjMediaPoolGUI\editTitlesAndDescriptions(), ilExSubmissionTeamGUI\getAdoptForm(), ilObjStyleSheetGUI\getCloneForm(), ilObjStyleSheetGUI\getCreateForm(), ilSurveyEvaluationGUI\getExportModal(), ilObjStyleSheetGUI\getImportForm(), ilPCAMDFormGUI\getPortfolioForm(), ilPortfolioRoleAssignmentGUI\initAssignmentForm(), ilObjNotificationSettingsGUI\initForm(), ilMediaCreationGUI\initPoolSelection(), ilObjStyleSheetGUI\initPropertiesForm(), ilBookingGatewayGUI\initSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilMediaCreationGUI\initUrlForm(), and ilContSkillAdminGUI\listProfiles().

360  : string {
361  return $this->getFormActionByClass(
362  $this->getClassByObject($a_gui_obj),
363  $a_fallback_cmd,
364  $a_anchor,
365  $is_async,
366  $has_xml_style
367  );
368  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
getFormActionByClass( $a_class, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ Here is the call graph for this function:
+ 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 
)

Implements ilCtrlInterface.

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

References getTargetUrl().

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

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

◆ getHTML()

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

Implements ilCtrlInterface.

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

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

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  }
$context
Definition: webdav.php:31
object $exec_object
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$structure
TOTAL STRUCTURE.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
populateCall(string $class_name, string $cmd_mode)
Helper function that populates a call in the current stacktrace.
+ 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 
)

Implements ilCtrlInterface.

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

References getClassByObject(), and getLinkTargetByClass().

Referenced by ilObjWorkspaceFolderGUI\addContentSubTabs(), ilObjExerciseGUI\addContentSubTabs(), ilTaxMDGUI\addSubTab(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilLMPageObjectGUI\create(), ilContainerFilterAdminGUI\executeCommand(), ilContSkillMemberTableGUI\fillRow(), ilCopySelfAssQuestionTableGUI\fillRow(), ilContProfileTableGUI\fillRow(), ilObjLearningHistorySettingsGUI\getAdminTabs(), ilObjCommentsSettingsGUI\getAdminTabs(), ilObjNotesSettingsGUI\getAdminTabs(), ilObjPersonalWorkspaceSettingsGUI\getAdminTabs(), ilContainerFilterAdminGUI\getFieldSelectionForm(), ilNoteGUI\getGlyph(), ilLikeGUI\getHTML(), ilNoteGUI\getNumber(), ilObjPortfolioGUI\getOfflineMessage(), ilPortfolioRepositoryGUI\getPortfolioList(), ilObjContentObjectGUI\getPublicAccessColValue(), ilPCAMDFormGUI\getTemplateForm(), ilNoteGUI\getTriggerShyButton(), ilNoteGUI\getWidget(), ilObjPortfolioAdministrationGUI\initAuthorshipForm(), ilObjLearningHistorySettingsGUI\initForm(), ilObjCommentsSettingsGUI\initForm(), ilObjNotesSettingsGUI\initForm(), ilObjBookingPoolGUI\initHeaderAction(), ilLMPageObjectGUI\initNewPageForm(), ilBookingPreferencesGUI\initPreferenceForm(), ilObjSkillTreeGUI\initTreeForm(), ilContSkillAdminGUI\listCompetences(), ilRecommendedContentRoleConfigGUI\listItems(), ilMediaCreationGUI\listPoolItems(), ilTaggingClassificationProvider\render(), ilLearningHistoryGUI\renderButton(), ilContainerRenderer\renderHelperGeneric(), ilTaggingSlateContentGUI\renderResourcesForTag(), ilObjDashboardSettingsGUI\setSettingsSubTabs(), ilBookingGatewayGUI\setSubTabs(), ilPDNotesGUI\setToolbar(), ilGroupAddToGroupActionGUI\show(), ilSkillRootGUI\showImportForm(), and ilSkillProfileGUI\showLevelsWithLocalContext().

322  : string {
323  return $this->getLinkTargetByClass(
324  $this->getClassByObject($a_gui_obj),
325  $a_cmd,
326  $a_anchor,
327  $is_async,
328  $has_xml_style
329  );
330  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ Here is the call graph for this function:
+ 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 
)

Implements ilCtrlInterface.

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

References getTargetUrl().

Referenced by ilBlockGUI\addRepoCommands(), ilContainerSkillGUI\addTabs(), ILIAS\User\StaticURLHandler\buildChangeEmailUrl(), ILIAS\Test\StaticURLHandler\buildQuestionURL(), ilExAssTypeUploadGUI\buildSubmissionPropertiesAndActions(), ilExAssTypeWikiTeamGUI\buildSubmissionPropertiesAndActions(), ilSkillProfileGUI\createLocal(), ilContProfileTableGUI\fillRow(), ilBookingParticipantsTableGUI\fillRow(), ilKSDocumentationGotoLink\generateRedirectURL(), ilContainerPageGUI\getAdditionalPageActions(), ilObjLearningHistorySettingsGUI\getAdminTabs(), ilObjCommentsSettingsGUI\getAdminTabs(), ilObjNotesSettingsGUI\getAdminTabs(), ilObjPersonalWorkspaceSettingsGUI\getAdminTabs(), ilNoteGUI\getButton(), ilAccessibilitySupportContactsGUI\getFooterLink(), ilSurveyContainsDataMessageBoxGUI\getHTML(), McstPodcastGUI\getHTML(), ilExAssignmentInfo\getInstructionFileInfo(), ilAchievementsGUI\getLinks(), getLinkTarget(), ilPortfolioRepositoryGUI\getPortfolioList(), ilNoteGUI\getShyButton(), ilPageObjectGUI\getTinyMenu(), ilPortfolioTemplatePageGUI\getViewPageLink(), ilPortfolioPageGUI\getViewPageLink(), ilHelpGUI\initHelp(), ilBookingPreferencesGUI\listBookingResults(), ilContSkillAdminGUI\listProfiles(), ilSkillTreeAdminGUI\listTrees(), redirectByClass(), ilExAssTypeWikiTeamGUI\renderOverviewContent(), setReturnByClass(), ilBookingGatewayGUI\setSubTabs(), ilPDNotesGUI\setToolbar(), and ilSkillProfileGUI\showLevelsWithLocalContext().

341  : string {
342  return $this->getTargetUrl(
343  $a_class,
344  $a_cmd,
345  $a_anchor,
346  $is_async,
347  $has_xml_style
348  ) ?? '';
349  }
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNextClass()

ilCtrl::getNextClass (   $a_gui_class = null)

Implements ilCtrlInterface.

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

References getClassByObject(), and null.

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

188  : ?string
189  {
190  if (null === $a_gui_class && null === $this->exec_object) {
191  return '';
192  }
193 
194  if (null === $this->context->getPath()) {
195  return '';
196  }
197 
198  $next_cid = $this->context->getPath()->getNextCid(
199  $this->getClassByObject($a_gui_class ?? $this->exec_object)
200  );
201 
202  if (null !== $next_cid) {
203  return strtolower($this->structure->getObjNameByCid($next_cid) ?? '');
204  }
205 
206  return '';
207  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getParameterArray()

ilCtrl::getParameterArray ( object  $a_gui_obj)

Implements ilCtrlInterface.

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

References getClassByObject(), and getParameterArrayByClass().

252  : array
253  {
254  return $this->getParameterArrayByClass($this->getClassByObject($a_gui_obj));
255  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
getParameterArrayByClass(string $a_class)
+ Here is the call graph for this function:

◆ getParameterArrayByClass()

ilCtrl::getParameterArrayByClass ( string  $a_class)

Implements ilCtrlInterface.

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

References getQueryParam(), and null.

Referenced by appendParameterStringsByClass(), and getParameterArray().

260  : array
261  {
262  if (null === $this->structure->getClassCidByName($a_class)) {
263  throw new ilCtrlException("Cannot find provided class '$a_class' in the control structure.");
264  }
265 
266  $parameters = [];
267  $permanent_parameters = $this->structure->getPermanentParametersByClass($a_class);
268  if (null !== $permanent_parameters) {
269  foreach ($permanent_parameters as $parameter) {
270  $parameters[$parameter] = $this->getQueryParam($parameter);
271  }
272  }
273 
274  $temporary_parameters = $this->structure->getTemporaryParametersByClass($a_class);
275  if (null !== $temporary_parameters) {
276  // override existing ones, as temporary parameters
277  // are prioritised over fetched ones.
278  foreach ($temporary_parameters as $key => $value) {
279  $parameters[$key] = $value;
280  }
281  }
282 
283  return $parameters;
284  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getQueryParam(string $parameter_name)
Returns a parameter with the given name from the current GET request.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getParentReturn()

ilCtrl::getParentReturn ( object  $a_gui_obj)

Implements ilCtrlInterface.

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

References getClassByObject(), and getParentReturnByClass().

Referenced by ilPageContentGUI\getParentReturn().

624  : ?string
625  {
626  return $this->getParentReturnByClass($this->getClassByObject($a_gui_obj));
627  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
getParentReturnByClass(string $a_class)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getParentReturnByClass()

ilCtrl::getParentReturnByClass ( string  $a_class)

Implements ilCtrlInterface.

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

References $path, and null.

Referenced by getParentReturn(), and returnToParent().

632  : ?string
633  {
634  $path = $this->path_factory->find($this->context, $a_class);
635  if (null !== $path->getCidPath()) {
636  foreach ($path->getCidArray() as $cid) {
637  $current_class = $this->structure->getClassNameByCid($cid);
638  $return_target = $this->structure->getReturnTargetByClass($current_class);
639  if (null !== $return_target) {
640  return $return_target;
641  }
642  }
643  }
644 
645  return null;
646  }
$path
Definition: ltiservices.php:29
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getPostCommand()

ilCtrl::getPostCommand ( )
private

Returns the current $_POST command.

Returns
string|null

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

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

Referenced by getDeterminedCommand().

808  : ?string
809  {
810  if ($this->post_parameters->has(self::PARAM_CMD)) {
811  return $this->post_parameters->retrieve(
812  self::PARAM_CMD,
813  $this->refinery->custom()->transformation(
814  static function ($value): ?string {
815  if (!empty($value)) {
816  if (is_array($value)) {
817  // this most likely only works by accident, but
818  // the selected or clicked command button will
819  // always be sent as first array entry. This
820  // should definitely be done differently.
821  return (string) array_key_first($value);
822  }
823 
824  return (string) $value;
825  }
826 
827  return null;
828  }
829  )
830  );
831  }
832 
833  return null;
834  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ 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 763 of file class.ilCtrl.php.

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

Referenced by getDeterminedCommand(), and getParameterArrayByClass().

763  : ?string
764  {
765  if ($this->get_parameters->has($parameter_name)) {
766  return $this->get_parameters->retrieve(
767  $parameter_name,
768  $this->refinery->to()->string()
769  );
770  }
771 
772  return null;
773  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRedirectSource()

ilCtrl::getRedirectSource ( )

Implements ilCtrlInterface.

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

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

◆ getTableCommand()

ilCtrl::getTableCommand ( )
private
Deprecated:

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

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

Referenced by getDeterminedCommand().

778  : ?string
779  {
780  if ($this->post_parameters->has('table_top_cmd')) {
781  return $this->post_parameters->retrieve(
782  'table_top_cmd',
783  $this->refinery->custom()->transformation(function ($item): ?string {
784  return is_array($item) ? key($item) : null;
785  })
786  );
787  }
788  // Button on top of the table
789  if ($this->post_parameters->has('select_cmd2')) {
790  return $this->post_parameters->has('selected_cmd2')
791  ? $this->post_parameters->retrieve('selected_cmd2', $this->refinery->to()->string())
792  : null;
793  }
794  // Button at bottom of the table
795  if ($this->post_parameters->has('select_cmd')) {
796  return $this->post_parameters->has('selected_cmd')
797  ? $this->post_parameters->retrieve('selected_cmd', $this->refinery->to()->string())
798  : null;
799  }
800 
801  return null;
802  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ 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 848 of file class.ilCtrl.php.

References $path, $token, appendParameterStringsByClass(), isCmdSecure(), ilUIHookPluginGUI\KEEP, and null.

Referenced by getFormActionByClass(), and getLinkTargetByClass().

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

◆ insertCtrlCalls()

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

Implements ilCtrlInterface.

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

659  : void
660  {
661  throw new ilCtrlException(__METHOD__ . " is deprecated and must not be used.");
662  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ isAsynch()

ilCtrl::isAsynch ( )

Implements ilCtrlInterface.

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

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

571  : bool
572  {
573  return $this->context->isAsync();
574  }
+ 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 1007 of file class.ilCtrl.php.

References null.

Referenced by getDeterminedCommand(), and getTargetUrl().

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

◆ lookupClassPath()

ilCtrl::lookupClassPath ( string  $a_class)

Implements ilCtrlInterface.

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

References $path, and null.

532  : string
533  {
534  $path = $this->structure->getRelativePathByName($a_class);
535  if (null === $path) {
536  throw new ilCtrlException("Class '$a_class' cannot be found in the control structure.");
537  }
538 
539  return $path;
540  }
$path
Definition: ltiservices.php:29
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ lookupOriginalClassName()

ilCtrl::lookupOriginalClassName ( string  $a_class)

Implements ilCtrlInterface.

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

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

◆ populateCall()

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

Helper function that populates a call in the current stacktrace.

Parameters
string$class_name
string$cmd_mode

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

References getDeterminedCommand().

Referenced by forwardCommand(), and getHTML().

1117  : void
1118  {
1119  $obj_name = $this->structure->getObjNameByName($class_name);
1120 
1121  $this->stacktrace[] = [
1122  self::PARAM_CMD_CLASS => $obj_name,
1123  self::PARAM_CMD_MODE => $cmd_mode,
1124  self::PARAM_CMD => $this->getDeterminedCommand(),
1125  ];
1126  }
getDeterminedCommand()
+ Here is the call graph for this function:
+ 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 
)

Implements ilCtrlInterface.

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

References getClassByObject(), and redirectByClass().

Referenced by ilBadgeProfileGUI\activate(), ilBadgeProfileGUI\activateInCard(), ilExcCriteriaGUI\add(), ilObjMediaCastGUI\addMobsToCast(), ilObjMediaPoolGUI\addMobsToPool(), ilPCTabsGUI\addTab(), ilObjBlogGUI\afterSave(), ilSkillTreeNodeGUI\afterUpdate(), ilRecommendedContentRoleConfigGUI\assignItem(), ilObjExerciseAdministrationGUI\cancel(), ilObjBlogAdministrationGUI\cancel(), ilObjMediaCastSettingsGUI\cancel(), ilObjPortfolioAdministrationGUI\cancel(), ilObjTaggingSettingsGUI\cancel(), ilObjAwarenessAdministrationGUI\cancel(), ilObjStyleSheetGUI\cancelColorDeletionObject(), ilObjStyleSheetGUI\cancelColorSavingObject(), ilSkillRootGUI\cancelDelete(), ilObjMediaPoolGUI\cancelSave(), ilPCTabsGUI\cancelTabDeletion(), ilObjStyleSheetGUI\cancelTemplateDeletionObject(), ilObjStyleSheetGUI\cancelTemplateSavingObject(), ilWikiPageGUI\cancelWikiPageDeletion(), ilInternalLinkGUI\changeLinkType(), ilRecommendedContentRoleConfigGUI\checkPushPermission(), ilBadgeManagementGUI\clearClipboard(), ilPortfolioRoleAssignmentGUI\confirmAssignmentDeletion(), ilContSkillAdminGUI\confirmDeleteSelectedLocalProfiles(), ilContSkillAdminGUI\confirmDeleteSingleLocalProfile(), ilContSkillAdminGUI\confirmRemoveSelectedGlobalProfiles(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilContSkillAdminGUI\confirmRemoveSingleGlobalProfile(), ilExcCriteriaGUI\create(), ilBadgeProfileGUI\deactivate(), ilBadgeProfileGUI\deactivateInCard(), ilContSkillAdminGUI\deassignCompetences(), ilContSkillAdminGUI\deassignCompetencesConfirm(), ilPortfolioRoleAssignmentGUI\deleteAssignments(), ilObjStyleSheetGUI\deleteColorObject(), ilPCFileListGUI\deleteFileItem(), ilBasicSkillGUI\deleteLevel(), ilObjStyleSheetGUI\deleteMediaQueriesObject(), ilContSkillAdminGUI\deleteSelectedLocalProfiles(), ilContSkillAdminGUI\deleteSingleLocalProfile(), ilObjMediaObjectGUI\deleteSrtFilesObject(), ilObjStyleSheetGUI\deleteTemplateKeepClassesObject(), ilObjStyleSheetGUI\deleteTemplateObject(), ilExAssignmentEditorGUI\downloadGlobalFeedbackFileObject(), ilPCInteractiveImageGUI\edit(), ilExSubmissionTextGUI\editAssignmentTextObject(), ilNewsItemGUI\exitUpdateNewsItem(), ilObjMediaObjectGUI\extractPreviewImageObject(), ilBadgeManagementGUI\getBadgesFromMultiAction(), ilObjBadgeAdministrationGUI\getObjectBadgesFromMultiAction(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilSurveyParticipantsGUI\inviteUsers(), ilBadgeManagementGUI\pasteBadges(), ilContSkillAdminGUI\publishAssignments(), ilEditClipboardGUI\remove(), ilMultilingualismGUI\removeLanguages(), ilContSkillAdminGUI\removeSelectedGlobalProfiles(), ilContSkillAdminGUI\removeSelectedSkill(), ilContSkillAdminGUI\removeSingleGlobalProfile(), ilInternalLinkGUI\resetLinkList(), ilObjMediaPoolGUI\returnFromItem(), ilTaxMDGUI\save(), ilObjNotificationSettingsGUI\save(), ilObjSkillTreeGUI\save(), ilPortfolioRoleAssignmentGUI\saveAssignment(), ilObjPortfolioAdministrationGUI\saveAuthorship(), ilContSkillAdminGUI\saveCompetenceAssignment(), ilContainerFilterAdminGUI\saveFields(), ilObjStyleSheetGUI\saveMediaQueryOrderObject(), ilObjMediaObjectGUI\saveMultiSrtObject(), ilObjBookingPoolGUI\saveNotificationObject(), ilObjStyleSheetGUI\saveObject(), ilPCFileListGUI\savePositions(), ilPCFileListGUI\savePositionsAndClasses(), ilBookingPreferencesGUI\savePreferences(), ilUserPrivacySettingsGUI\savePrivacySettings(), ilContSkillAdminGUI\saveSelectedProfile(), ilContSkillAdminGUI\saveSelectedSkill(), ilObjLearningHistorySettingsGUI\saveSettings(), ilObjNotesSettingsGUI\saveSettings(), ilObjCommentsSettingsGUI\saveSettings(), ilBookingGatewayGUI\saveSettings(), ilContSkillAdminGUI\saveSettings(), ilObjMediaPoolGUI\saveTitlesAndDescriptions(), ilExerciseManagementGUI\selectAssignmentObject(), ilExerciseManagementGUI\selectParticipantObject(), ilMediaCreationGUI\selectPool(), ilObjContentObjectGUI\sendMailToBlockedUsers(), ilInternalLinkGUI\setMedPoolFolder(), ilBookingGatewayGUI\show(), ilPCImageMapEditorGUI\updateAreas(), ilExSubmissionTextGUI\updateAssignmentTextObject(), ilObjStyleSheetGUI\updateObject(), ilObjMediaObjectGUI\uploadSubtitleFileObject(), and ilSurveyEvaluationGUI\validateAndSubmitExportForm().

398  : void {
399  $this->redirectByClass(
400  $this->getClassByObject($a_gui_obj),
401  $a_cmd,
402  $a_anchor,
403  $is_async
404  );
405  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:
+ 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 
)

Implements ilCtrlInterface.

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

References getLinkTargetByClass(), and redirectToURL().

Referenced by ilObjCmiXapiVerificationGUI\_goto(), ilObjLTIConsumerVerificationGUI\_goto(), ilObjCourseVerificationGUI\_goto(), ilObjCourseReferenceGUI\_goto(), ilStructureObjectGUI\_goto(), ilObjCmiXapiGUI\_goto(), ilLMPageObjectGUI\_goto(), ilGlossaryTermGUI\_goto(), ilObjLTIConsumerGUI\_goto(), ilObjPortfolioGUI\_goto(), ilObjSurveyGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilObjWorkspaceFolderGUI\_goto(), ilObjWikiGUI\_goto(), ilObjGlossaryGUI\_goto(), ilObjMediaCastGUI\_goto(), ilObjMediaPoolGUI\_goto(), ilObjLinkResourceGUI\_goto(), ilObjQuestionPoolGUI\_goto(), ilObjContentObjectGUI\_goto(), ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObjectGUI\_gotoSharedWorkspaceNode(), ilNoteGUI\activateComments(), ilContainerGUI\competencesObject(), ilObjSkillTreeGUI\confirmedDeleteTrees(), ilObjPortfolioTemplateGUI\createFromTemplate(), ilExSubmissionObjectGUI\createPortfolioFromAssignmentObject(), ilContentStyleSettingsGUI\createStyle(), ilNoteGUI\deactivateComments(), ilObjExerciseVerificationGUI\downloadFromPortfolioPage(), ilObjStyleSheetGUI\editObject(), ilObjLearningSequenceGUI\forwardByClass(), ilAdministrationGUI\jumpToPluginSlot(), ilSkillProfileGUI\listLocalProfiles(), ilGlossaryPresentationGUI\listTermByGivenAsPanel(), redirect(), ilObjFileBasedLMGUI\redirectAfterCreation(), ilObjSessionGUI\redirectToParentContentPageObject(), ilRepositoryGUI\redirectToRoot(), ilObjSkillTreeGUI\save(), ilAchievementsGUI\show(), ilBookingGatewayGUI\show(), ilPDNotesGUI\showPrivateNotes(), and ilObjExerciseGUI\startAssignmentObject().

415  : void {
416  $this->redirectToURL(
417  $this->getLinkTargetByClass(
418  $a_class,
419  $a_cmd,
420  $a_anchor,
421  $is_async
422  )
423  );
424  }
redirectToURL(string $target_url)
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectToURL()

ilCtrl::redirectToURL ( string  $target_url)

Implements ilCtrlInterface.

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

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

Referenced by ilObjUserFolderGUI\_goto(), ilObjTaxonomyGUI\cancel(), redirectByClass(), ilKSDocumentationGotoLink\redirectWithGotoLink(), and returnToParent().

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

Implements ilCtrlInterface.

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

References getClassByObject(), getParentReturnByClass(), null, and redirectToURL().

Referenced by ilMediaCreationGUI\cancel(), ilMediaCreationGUI\cancelCreate(), ilContainerGUI\cancelMoveLinkObject(), ilMediaPoolPageGUI\cancelSaveNewMediaPoolPage(), ilNewsItemGUI\cancelSaveNewsItem(), ilNewsForContextBlockGUI\cancelSettings(), ilObjStyleSheetGUI\copyStyleObject(), ilNewsItemGUI\exitSaveNewsItem(), ilObjectCopyGUI\keepObjectsInClipboard(), ilContainerGUI\keepObjectsInClipboardObject(), ilObjStyleSheetGUI\returnToUpperContextObject(), and ilMediaCreationGUI\saveTitlesAndDescriptions().

601  : void
602  {
603  $class_name = $this->getClassByObject($a_gui_obj);
604  $target_url = $this->getParentReturnByClass($class_name);
605 
606  // append redirect source to target url.
607  $target_url = $this->appendParameterString(
608  $target_url,
609  self::PARAM_REDIRECT,
610  $class_name
611  );
612 
613  // append the provided anchor if necessary.
614  if (null !== $a_anchor) {
615  $target_url .= "#$a_anchor";
616  }
617 
618  $this->redirectToURL($target_url);
619  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getParentReturnByClass(string $a_class)
redirectToURL(string $target_url)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveParameter()

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

Implements ilCtrlInterface.

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

References getClassByObject(), and saveParameterByClass().

Referenced by ilContSkillAdminGUI\assignCompetences(), ilSurveySkillGUI\assignSkillToQuestion(), ilMediaCreationGUI\editTitlesAndDescriptions(), ilObjMediaPoolGUI\editTitlesAndDescriptions(), ilNewsTimelineGUI\executeCommand(), and ilBookingGatewayGUI\initPool().

212  : void
213  {
214  $this->saveParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter);
215  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
saveParameterByClass(string $a_class, $a_parameter)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveParameterByClass()

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

Implements ilCtrlInterface.

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

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

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

◆ setContextObject()

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

Implements ilCtrlInterface.

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

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

◆ setParameter()

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

Implements ilCtrlInterface.

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

References getClassByObject(), and setParameterByClass().

Referenced by ilObjBlogGUI\addHeaderActionForCommand(), ilObjMediaCastGUI\addMobsToCast(), ilObjWikiGUI\addPagesSubTabs(), ilObjWikiGUI\addPageTabs(), ilPCDataTableGUI\afterCreation(), ilPCTabsGUI\afterCreation(), ilSurveyEvaluationGUI\buildExportButtonAndModal(), ilObjMediaPoolGUI\cancelFolderUpdate(), ilInternalLinkGUI\changeLinkType(), ilInternalLinkGUI\changeTargetObject(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilNoteGUI\confirmDelete(), ilLMPageObjectGUI\create(), ilSkillTreeNodeGUI\deleteNodes(), ilNoteGUI\deleteNote(), ilRatingCategoryGUI\edit(), ilObjStyleSheetGUI\editColorObject(), ilStructureObjectGUI\editMasterLanguage(), ilObjContentObjectGUI\editMasterLanguage(), ilObjStyleSheetGUI\editMediaQueryObject(), ilObjSkillTreeGUI\editSkillTemplates(), ilObjStyleSheetGUI\editTemplateObject(), ilGroupAddToGroupActionGUI\executeCommand(), ilColumnGUI\executeCommand(), ilLMGlossaryTableGUI\fillRow(), ilLMMenuItemsTableGUI\fillRow(), ilTaxonomyListTableGUI\fillRow(), ilRatingCategoryTableGUI\fillRow(), ilHelpModuleTableGUI\fillRow(), ilStyleMediaQueryTableGUI\fillRow(), ilBookingSchedulesTableGUI\fillRow(), ilStyleColorTableGUI\fillRow(), ilTableTemplatesTableGUI\fillRow(), ilPageLayoutTableGUI\fillRow(), ilExerciseVerificationTableGUI\fillRow(), ilSurveySkillTableGUI\fillRow(), ilContSkillMemberTableGUI\fillRow(), ilSurveySkillAssignmentTableGUI\fillRow(), ilExcCriteriaTableGUI\fillRow(), ilTaxonomyTableGUI\fillRow(), ilCopySelfAssQuestionTableGUI\fillRow(), ilNewItemGroupTableGUI\fillRow(), ilContProfileTableGUI\fillRow(), ilSkillLevelTableGUI\fillRow(), ilExcCriteriaCatalogueTableGUI\fillRow(), ilWorkspaceAccessTableGUI\fillRow(), ilAssignmentsPerParticipantTableGUI\fillRow(), ilParticipantsPerAssignmentTableGUI\fillRow(), ilNoteGUI\getGlyph(), ilLikeGUI\getHTML(), ilColumnGUI\getHTML(), ilCommentGUI\getListHTML(), ilNoteGUI\getNotesHTML(), ilNoteGUI\getNumber(), ilPortfolioRepositoryGUI\getPortfolioList(), ilNoteGUI\getTriggerShyButton(), ilNoteGUI\getWidget(), ilInternalLinkGUI\init(), ilExAssignmentEditorGUI\initAssignmentForm(), ilObjBookingPoolGUI\initHeaderAction(), ilBookingGatewayGUI\initPool(), ilSkillProfileGUI\initProfileForm(), ilExAssignmentEditorGUI\listAssignmentsObject(), ilMediaCreationGUI\listPoolItems(), ilPageEditorGUI\pasteFromClipboard(), ilPCContentIncludeGUI\poolSelection(), ilTaggingClassificationProvider\render(), ilLearningHistoryGUI\renderButton(), ilContainerRenderer\renderHelperGeneric(), ilInternalLinkGUI\resetLinkList(), ilObjMediaPoolGUI\returnFromItem(), ilObjContentObjectGUI\savePageLayout(), ilExerciseManagementGUI\selectAssignmentObject(), ilExerciseManagementGUI\selectParticipantObject(), ilPCContentIncludeGUI\selectPool(), ilPCMediaObjectGUI\selectPool(), ilPCQuestionGUI\selectPool(), ilMediaCreationGUI\selectPool(), ilInternalLinkGUI\selectRepositoryItem(), ilSurveySkillThresholdsGUI\selectSkill(), ilObjMediaPoolGUI\setContentSubTabs(), ilInternalLinkGUI\setMedPoolFolder(), ilTable2GUI\setOrderLink(), ilObjContentObjectGUI\setPageLayoutInHierarchy(), ilRepositorySelectorInputGUI\showRepositorySelection(), ilStructureObjectGUI\switchToLanguage(), ilObjContentObjectGUI\switchToLanguage(), and ilSurveyEvaluationGUI\validateAndSubmitExportForm().

236  : void
237  {
238  $this->setParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter, $a_value);
239  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
setParameterByClass(string $a_class, string $a_parameter, $a_value)
+ 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 
)

Implements ilCtrlInterface.

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

Referenced by ilObjCmiXapiVerificationGUI\_goto(), ilObjLTIConsumerVerificationGUI\_goto(), ilObjCourseVerificationGUI\_goto(), ilObjCourseReferenceGUI\_goto(), ilStructureObjectGUI\_goto(), ilObjCmiXapiGUI\_goto(), ilLMPageObjectGUI\_goto(), ilGlossaryTermGUI\_goto(), ilObjLTIConsumerGUI\_goto(), ilObjPortfolioGUI\_goto(), ilObjSurveyGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilObjWorkspaceFolderGUI\_goto(), ilObjWikiGUI\_goto(), ilObjGlossaryGUI\_goto(), ilObjMediaCastGUI\_goto(), ilObjMediaPoolGUI\_goto(), ilObjLinkResourceGUI\_goto(), ilObjQuestionPoolGUI\_goto(), ilObjContentObjectGUI\_goto(), ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObjectGUI\_gotoSharedWorkspaceNode(), ilPCFileListGUI\addFileItem(), ilBlockGUI\addRepoCommands(), ilBasicSkillGUI\afterSave(), ilBasicSkillTemplateGUI\afterSave(), ilSkillTemplateReferenceGUI\afterSave(), ILIAS\User\StaticURLHandler\buildChangeEmailUrl(), ILIAS\Test\StaticURLHandler\buildQuestionURL(), ilExAssTypeWikiTeamGUI\buildSubmissionPropertiesAndActions(), ilBlogPostingGUI\cancelBlogPostingDeletion(), ilObjWikiGUI\cancelCreationPageUsingTemplateObject(), ilObjPortfolioTemplateGUI\createFromTemplate(), ilExSubmissionObjectGUI\createPortfolioFromAssignmentObject(), ilObjExerciseVerificationGUI\downloadFromPortfolioPage(), ilObjSkillTreeGUI\editSkills(), ilFoundUsersTableGUI\fillRow(), ilLinksTableGUI\fillRow(), ilContentStylesTableGUI\fillRow(), ilContProfileTableGUI\fillRow(), ilSkillCatTableGUI\fillRow(), ilBookingParticipantsTableGUI\fillRow(), ilObjLearningSequenceGUI\forwardByClass(), ilKSDocumentationGotoLink\generateRedirectURL(), McstPodcastGUI\getHTML(), ilRepositorySelector2InputGUI\getHTML(), ilExAssignmentInfo\getInstructionFileInfo(), ilNoteGUI\getItemForNote(), ilNewsForContextBlockGUI\getJSEnabler(), ilPCFileItemFileSelectorGUI\getNodeHref(), ilPoolSelectorGUI\getNodeHref(), ilTaxonomyExplorerGUI\getNodeHref(), ilMediaPoolExplorerGUI\getNodeHref(), ilSkillTemplateTreeExplorerGUI\getNodeHref(), ilRepositoryExplorerGUI\getNodeHref(), ilRepositorySelectorExplorerGUI\getNodeHref(), ilPersonalSkillExplorerGUI\getNodeHref(), ilPortfolioRepositoryGUI\getPortfolioList(), ilNoteGUI\getShyButton(), ILIAS\Exercise\Assignment\PropertyAndActionBuilderUI\getSubmissionLink(), ilBlogPostingGUI\getTabs(), ilPortfolioTemplatePageGUI\getViewPageLink(), ilPortfolioPageGUI\getViewPageLink(), ilBookingPreferencesGUI\listBookingResults(), ilObjFileBasedLMGUI\redirectAfterCreation(), ilContainerReferenceGUI\redirectObject(), ilBasicSkillTemplateGUI\redirectToParent(), ilSkillTemplateReferenceGUI\redirectToParent(), ilObjSessionGUI\redirectToParentContentPageObject(), ilRepositoryGUI\redirectToRoot(), ilRepositorySelector2InputGUI\render(), ILIAS\Blog\Navigation\ToolbarNavigationRenderer\renderActionDropdown(), ilExAssTypeWikiTeamGUI\renderOverviewContent(), setParameter(), ilObjSkillTreeGUI\showLocator(), ilObjWikiGUI\showTemplateSelectionObject(), ilObjExerciseGUI\startAssignmentObject(), and ilExerciseManagementGUI\waitingDownloadObject().

244  : void
245  {
246  $this->structure->setTemporaryParameterByClass($a_class, $a_parameter, $a_value);
247  }
+ Here is the caller graph for this function:

◆ setReturn()

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

Implements ilCtrlInterface.

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

References getClassByObject(), and setReturnByClass().

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

579  : void
580  {
581  $this->setReturnByClass($this->getClassByObject($a_gui_obj), $a_cmd);
582  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
setReturnByClass(string $a_class, ?string $a_cmd=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setReturnByClass()

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

Implements ilCtrlInterface.

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

References getLinkTargetByClass().

Referenced by ilObjectCopyGUI\cancel(), and setReturn().

587  : void
588  {
589  $this->structure->setReturnTargetByClass(
590  $a_class,
591  $this->getLinkTargetByClass(
592  $a_class,
593  $a_cmd
594  )
595  );
596  }
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTargetScript()

ilCtrl::setTargetScript ( string  $a_target_script)

Implements ilCtrlInterface.

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

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

563  : void
564  {
565  $this->context->setTargetScript($a_target_script);
566  }
+ 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(), and getDeterminedCommand().

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

Referenced by getCallHistory().


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