ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCtrl Class Reference

Class ilCtrl provides processing control methods. More...

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

Public Member Functions

 __construct (ilCtrlStructureInterface $structure, ilCtrlTokenRepositoryInterface $token_repository, ilCtrlPathFactoryInterface $path_factory, ilCtrlContextInterface $context, ResponseSenderStrategy $response_sender, ServerRequestInterface $server_request, RequestWrapper $post_parameters, RequestWrapper $get_parameters, Refinery $refinery, ilComponentFactory $component_factory, ilCtrlQueryParserInterface $query_parser)
 ilCtrl Constructor More...
 
 __clone ()
 
 callBaseClass (string $a_base_class=null)
 
 forwardCommand (object $a_gui_object)
 
 getHTML (object $a_gui_object, array $a_parameters=null)
 
 getCmd (string $fallback_command=null)
 
 setCmd (?string $a_cmd)
 
 getCmdClass ()
 
 setCmdClass ($a_cmd_class)
 
 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 ()
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Data Fields inherited from ilCtrlInterface
const CMD_POST = 'post'
 
const PARAM_CSRF_TOKEN = 'rtoken'
 $_GET request parameter names, used throughout ilCtrl. More...
 
const PARAM_CID_PATH = 'cmdNode'
 
const PARAM_REDIRECT = 'redirectSource'
 
const PARAM_BASE_CLASS = 'baseClass'
 
const PARAM_CMD_CLASS = 'cmdClass'
 
const PARAM_CMD_MODE = 'cmdMode'
 
const PARAM_CMD_FALLBACK = 'fallbackCmd'
 
const PARAM_CMD = 'cmd'
 
const PROTECTED_PARAMETERS
 
const CMD_MODE_PROCESS = 'execComm'
 different modes used for UI plugins (or in dev-mode). More...
 
const CMD_MODE_ASYNC = 'asynch'
 
const CMD_MODE_HTML = 'getHtml'
 

Detailed Description

Class ilCtrl provides processing control methods.

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

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

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

Constructor & Destructor Documentation

◆ __construct()

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

ilCtrl Constructor

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

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

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

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

Member Function Documentation

◆ __clone()

ilCtrl::__clone ( )

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

References $structure.

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

◆ appendParameterStringsByClass()

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

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

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

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

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

Referenced by getTargetUrl().

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

◆ callBaseClass()

ilCtrl::callBaseClass ( string  $a_base_class = null)

Implements ilCtrlInterface.

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

References forwardCommand().

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

◆ checkCurrentPathForClass()

ilCtrl::checkCurrentPathForClass ( string  $gui_class)

Implements ilCtrlInterface.

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

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

◆ clearParameterByClass()

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

Implements ilCtrlInterface.

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

Referenced by ilDashboardRecommendedContentGUI\getListItemGroups().

445  : void
446  {
447  $this->structure->removeSingleParameterByClass($a_class, $a_parameter);
448  }
+ Here is the caller graph for this function:

◆ clearParameters()

ilCtrl::clearParameters ( object  $a_gui_obj)

Implements ilCtrlInterface.

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

References clearParametersByClass(), and getClassByObject().

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

◆ clearParametersByClass()

ilCtrl::clearParametersByClass ( string  $a_class)

Implements ilCtrlInterface.

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

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

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

◆ forwardCommand()

ilCtrl::forwardCommand ( object  $a_gui_object)

Implements ilCtrlInterface.

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

References populateCall().

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

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

References $stacktrace.

661  : array
662  {
663  return $this->stacktrace;
664  }
array $stacktrace

◆ getClassByObject()

ilCtrl::getClassByObject (   $object)
private

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

Parameters
object | string$object
Returns
string

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

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

1211  : string
1212  {
1213  return (is_object($object)) ? get_class($object) : $object;
1214  }
+ Here is the caller graph for this function:

◆ getClassForClasspath()

ilCtrl::getClassForClasspath ( string  $a_class_path)

Implements ilCtrlInterface.

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

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

◆ getCmd()

ilCtrl::getCmd ( string  $fallback_command = null)

Implements ilCtrlInterface.

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

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

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

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

◆ getCmdClass()

ilCtrl::getCmdClass ( )

Implements ilCtrlInterface.

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

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

◆ getContextObjId()

ilCtrl::getContextObjId ( )

Implements ilCtrlInterface.

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

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

◆ getContextObjType()

ilCtrl::getContextObjType ( )

Implements ilCtrlInterface.

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

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

◆ getCurrentClassPath()

ilCtrl::getCurrentClassPath ( )

Implements ilCtrlInterface.

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

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

820  : array
821  {
822  if (null === $this->context->getPath()->getCidPath()) {
823  return [];
824  }
825 
826  $class_paths = [];
827  foreach ($this->context->getPath()->getCidArray(SORT_ASC) as $cid) {
828  $class_paths[] = $this->structure->getObjNameByCid($cid);
829  }
830 
831  return $class_paths;
832  }
+ 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 491 of file class.ilCtrl.php.

References getClassByObject(), and getFormActionByClass().

Referenced by ilExAssignmentTeamLogTableGUI\__construct(), ilParticipantsPerAssignmentTableGUI\__construct(), ilFeedbackConfirmationTable2GUI\__construct(), ilAddAnswerFormBuilder\__construct(), ILIAS\Style\Content\CharacteristicTableGUI\__construct(), ilTestSkillLevelThresholdsTableGUI\__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(), ilObjStyleSheetGUI\getImportForm(), ilPCAMDFormGUI\getPortfolioForm(), ilPortfolioRoleAssignmentGUI\initAssignmentForm(), ilUserProfileInfoSettingsGUI\initForm(), ilObjNotificationSettingsGUI\initForm(), ilObjUserGUI\initForm(), ilMediaCreationGUI\initPoolSelection(), ilObjStyleSheetGUI\initPropertiesForm(), ilBookingGatewayGUI\initSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilMediaCreationGUI\initUrlForm(), and ilContSkillAdminGUI\listProfiles().

497  : string {
498  return $this->getFormActionByClass(
499  $this->getClassByObject($a_gui_obj),
500  $a_fallback_cmd,
501  $a_anchor,
502  $is_async,
503  $has_xml_style
504  );
505  }
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 510 of file class.ilCtrl.php.

References getTargetUrl().

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

516  : string {
517  return $this->getTargetUrl(
518  $a_class,
519  $a_fallback_cmd,
520  $a_anchor,
521  $is_async,
522  $has_xml_style,
523  true
524  ) ?? '';
525  }
getTargetUrl( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $is_escaped=false, bool $is_post=false)
Helper function that returns a target URL string.
+ 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 209 of file class.ilCtrl.php.

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

209  : string
210  {
211  $class_name = get_class($a_gui_object);
212  // @TODO: remove this check once an interface for command classes exists.
213  if (!method_exists($a_gui_object, 'getHTML')) {
214  throw new ilCtrlException("$class_name doesn't implement getHTML().");
215  }
216 
217  $isolatad_structure = $this->structure;
218  $isolated_context = $this->context;
219  $isolated_object = $this->exec_object;
220 
221  $this->exec_object = $a_gui_object;
222  $this->populateCall($class_name, self::CMD_MODE_HTML);
223  $this->context
224  ->setCmdClass($class_name)
225  ->setCmdMode(self::CMD_MODE_HTML);
226 
227  $html = (null !== $a_parameters) ?
228  $a_gui_object->getHTML($a_parameters) :
229  $a_gui_object->getHTML();
230 
231  $this->structure = $isolatad_structure;
232  $this->context = $isolated_context;
233  $this->exec_object = $isolated_object;
234 
235  return $html;
236  }
object $exec_object
ilCtrlContextInterface $context
ilCtrl exceptions
populateCall(string $class_name, string $cmd_mode)
Helper function that populates a call in the current stacktrace.
ilCtrlStructureInterface $structure
+ 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 453 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(), ilNoteGUI\getCommentsWidget(), ilContainerFilterAdminGUI\getFieldSelectionForm(), ilLikeGUI\getHTML(), ilDashboardRecommendedContentGUI\getListItemGroups(), ilObjPortfolioGUI\getOfflineMessage(), ilPortfolioRepositoryGUI\getPortfolioList(), ilObjContentObjectGUI\getPublicAccessColValue(), ilPCAMDFormGUI\getTemplateForm(), ilObjPortfolioAdministrationGUI\initAuthorshipForm(), ilObjLearningHistorySettingsGUI\initForm(), ilObjCommentsSettingsGUI\initForm(), ilObjNotesSettingsGUI\initForm(), ilObjBookingPoolGUI\initHeaderAction(), ilStructureObjectGUI\initInsertTemplateForm(), ilLMPageObjectGUI\initNewPageForm(), ilBookingPreferencesGUI\initPreferenceForm(), ilObjSkillTreeGUI\initTreeForm(), ilStructureObjectGUI\insertTemplate(), ilContSkillAdminGUI\listCompetences(), ilRecommendedContentRoleConfigGUI\listItems(), ilMediaCreationGUI\listPoolItems(), ilTaggingClassificationProvider\render(), ilLearningHistoryGUI\renderButton(), ilContainerRenderer\renderHelperGeneric(), ilTaggingSlateContentGUI\renderResourcesForTag(), ilObjBlogGUI\renderToolbarNavigation(), ilObjDashboardSettingsGUI\setSettingsSubTabs(), ilBookingGatewayGUI\setSubTabs(), ilPDNotesGUI\setToolbar(), ilGroupAddToGroupActionGUI\show(), ilSkillRootGUI\showImportForm(), ilSkillProfileGUI\showLevelsWithLocalContext(), and ilPersonalProfileGUI\showPersonalData().

459  : string {
460  return $this->getLinkTargetByClass(
461  $this->getClassByObject($a_gui_obj),
462  $a_cmd,
463  $a_anchor,
464  $is_async,
465  $has_xml_style
466  );
467  }
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
+ 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 472 of file class.ilCtrl.php.

References getTargetUrl().

Referenced by ilBlockGUI\addRepoCommands(), ilContainerSkillGUI\addTabs(), ilSkillProfileGUI\createLocal(), ILIAS\Skill\Tree\SkillTreeTableGUI\fillRow(), ilContProfileTableGUI\fillRow(), ilBookingParticipantsTableGUI\fillRow(), 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(), ilObjBlogGUI\renderToolbarNavigation(), setReturnByClass(), ilBookingGatewayGUI\setSubTabs(), ilPDNotesGUI\setToolbar(), and ilSkillProfileGUI\showLevelsWithLocalContext().

478  : string {
479  return $this->getTargetUrl(
480  $a_class,
481  $a_cmd,
482  $a_anchor,
483  $is_async,
484  $has_xml_style
485  ) ?? '';
486  }
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 325 of file class.ilCtrl.php.

References getClassByObject().

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

325  : ?string
326  {
327  if (null === $a_gui_class && null === $this->exec_object) {
328  return '';
329  }
330 
331  if (null === $this->context->getPath()) {
332  return '';
333  }
334 
335  $next_cid = $this->context->getPath()->getNextCid(
336  $this->getClassByObject($a_gui_class ?? $this->exec_object)
337  );
338 
339  if (null !== $next_cid) {
340  return strtolower($this->structure->getObjNameByCid($next_cid) ?? '');
341  }
342 
343  return '';
344  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
+ 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 389 of file class.ilCtrl.php.

References getClassByObject(), and getParameterArrayByClass().

389  : array
390  {
391  return $this->getParameterArrayByClass($this->getClassByObject($a_gui_obj));
392  }
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 397 of file class.ilCtrl.php.

References ILIAS\LTI\ToolProvider\$key, and getQueryParam().

Referenced by appendParameterStringsByClass(), and getParameterArray().

397  : array
398  {
399  if (null === $this->structure->getClassCidByName($a_class)) {
400  throw new ilCtrlException("Cannot find provided class '$a_class' in the control structure.");
401  }
402 
403  $parameters = [];
404  $permanent_parameters = $this->structure->getPermanentParametersByClass($a_class);
405  if (null !== $permanent_parameters) {
406  foreach ($permanent_parameters as $parameter) {
407  $parameters[$parameter] = $this->getQueryParam($parameter);
408  }
409  }
410 
411  $temporary_parameters = $this->structure->getTemporaryParametersByClass($a_class);
412  if (null !== $temporary_parameters) {
413  // override existing ones, as temporary parameters
414  // are prioritised over fetched ones.
415  foreach ($temporary_parameters as $key => $value) {
416  $parameters[$key] = $value;
417  }
418  }
419 
420  return $parameters;
421  }
getQueryParam(string $parameter_name)
Returns a parameter with the given name from the current GET request.
string $key
Consumer key/client ID value.
Definition: System.php:193
ilCtrl exceptions
+ 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 761 of file class.ilCtrl.php.

References getClassByObject(), and getParentReturnByClass().

Referenced by ilPageContentGUI\getParentReturn().

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

References $path.

Referenced by getParentReturn(), and returnToParent().

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

◆ getPostCommand()

ilCtrl::getPostCommand ( )
private

Returns the current $_POST command.

Returns
string|null

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

References ILIAS\Repository\refinery().

Referenced by getCmd().

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

◆ getQueryParam()

ilCtrl::getQueryParam ( string  $parameter_name)
private

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

Parameters
string$parameter_name
Returns
string|null

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

References ILIAS\Repository\refinery().

Referenced by getCmd(), and getParameterArrayByClass().

840  : ?string
841  {
842  if ($this->get_parameters->has($parameter_name)) {
843  return $this->get_parameters->retrieve(
844  $parameter_name,
845  $this->refinery->to()->string()
846  );
847  }
848 
849  return null;
850  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRedirectSource()

ilCtrl::getRedirectSource ( )

Implements ilCtrlInterface.

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

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

◆ getTableCommand()

ilCtrl::getTableCommand ( )
private
Deprecated:

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

References ILIAS\Repository\refinery().

Referenced by getCmd().

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

◆ getTargetUrl()

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

Helper function that returns a target URL string.

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

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

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

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

Referenced by getFormActionByClass(), and getLinkTargetByClass().

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

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

◆ isAsynch()

ilCtrl::isAsynch ( )

Implements ilCtrlInterface.

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

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

708  : bool
709  {
710  return $this->context->isAsync();
711  }
+ Here is the caller graph for this function:

◆ isCmdSecure()

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

Returns whether a given command is considered safe or not.

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

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

Referenced by getCmd(), and getTargetUrl().

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

◆ lookupClassPath()

ilCtrl::lookupClassPath ( string  $a_class)

Implements ilCtrlInterface.

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

References $path.

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

◆ lookupOriginalClassName()

ilCtrl::lookupOriginalClassName ( string  $a_class)

Implements ilCtrlInterface.

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

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

◆ populateCall()

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

Helper function that populates a call in the current stacktrace.

Parameters
string$class_name
string$cmd_mode

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

References getCmd().

Referenced by forwardCommand(), and getHTML().

1194  : void
1195  {
1196  $obj_name = $this->structure->getObjNameByName($class_name);
1197 
1198  $this->stacktrace[] = [
1199  self::PARAM_CMD_CLASS => $obj_name,
1200  self::PARAM_CMD_MODE => $cmd_mode,
1201  self::PARAM_CMD => $this->getCmd(),
1202  ];
1203  }
getCmd(string $fallback_command=null)
+ 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 530 of file class.ilCtrl.php.

References getClassByObject(), and redirectByClass().

Referenced by ilBadgeProfileGUI\activate(), ilBadgeProfileGUI\activateInCard(), ilExcCriteriaGUI\add(), ilExAssignmentEditorGUI\addAssignmentObject(), ilObjMediaCastGUI\addMobsToCast(), ilPCTabsGUI\addTab(), ilObjItemGroupGUI\afterSave(), ilObjBlogGUI\afterSave(), ilSkillTreeNodeGUI\afterUpdate(), ilRecommendedContentRoleConfigGUI\assignItem(), ilSurveyPageEditGUI\callEditor(), ilObjExerciseAdministrationGUI\cancel(), ilObjBlogAdministrationGUI\cancel(), ilObjMediaCastSettingsGUI\cancel(), ilObjPortfolioAdministrationGUI\cancel(), ilObjTaggingSettingsGUI\cancel(), ilObjAwarenessAdministrationGUI\cancel(), ilObjTaxonomyGUI\cancel(), ilBlogPostingGUI\cancelBlogPostingDeletion(), ilObjStyleSheetGUI\cancelColorDeletionObject(), ilObjStyleSheetGUI\cancelColorSavingObject(), ilSkillRootGUI\cancelDelete(), ilObjMediaPoolGUI\cancelSave(), ilPCTabsGUI\cancelTabDeletion(), ilObjStyleSheetGUI\cancelTemplateDeletionObject(), ilObjStyleSheetGUI\cancelTemplateSavingObject(), ilWikiPageGUI\cancelWikiPageDeletion(), ilInternalLinkGUI\changeLinkType(), ilRecommendedContentRoleConfigGUI\checkPushPermission(), ilGlossaryPresentationGUI\chooseLetter(), 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(), ilExSubmissionTextGUI\editAssignmentTextObject(), ilNewsItemGUI\exitUpdateNewsItem(), 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(), ilUserProfileInfoSettingsGUI\save(), ilObjSkillTreeGUI\save(), ilPCIIMTriggerEditorGUI\saveArea(), 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(), ilObjDashboardSettingsGUI\saveViewSettings(), ilExerciseManagementGUI\selectAssignmentObject(), ilExerciseManagementGUI\selectParticipantObject(), ilMediaCreationGUI\selectPool(), ilObjContentObjectGUI\sendMailToBlockedUsers(), ilInternalLinkGUI\setMedPoolFolder(), ilBookingGatewayGUI\show(), ilObjExerciseGUI\startAssignmentObject(), ilExSubmissionTextGUI\updateAssignmentTextObject(), ilObjStyleSheetGUI\updateObject(), ilPCIIMTriggerEditorGUI\updateTrigger(), ilObjHelpSettingsGUI\uploadHelpFile(), and ilObjMediaObjectGUI\uploadSubtitleFileObject().

535  : void {
536  $this->redirectByClass(
537  $this->getClassByObject($a_gui_obj),
538  $a_cmd,
539  $a_anchor,
540  $is_async
541  );
542  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
+ 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 547 of file class.ilCtrl.php.

References getLinkTargetByClass(), and redirectToURL().

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

552  : void {
553  $this->redirectToURL(
554  $this->getLinkTargetByClass(
555  $a_class,
556  $a_cmd,
557  $a_anchor,
558  $is_async
559  )
560  );
561  }
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
redirectToURL(string $target_url)
+ 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 566 of file class.ilCtrl.php.

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

Referenced by ilObjUserFolderGUI\_goto(), redirectByClass(), and returnToParent().

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

◆ returnToParent()

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

Implements ilCtrlInterface.

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

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

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

738  : void
739  {
740  $class_name = $this->getClassByObject($a_gui_obj);
741  $target_url = $this->getParentReturnByClass($class_name);
742 
743  // append redirect source to target url.
744  $target_url = $this->appendParameterString(
745  $target_url,
746  self::PARAM_REDIRECT,
747  $class_name
748  );
749 
750  // append the provided anchor if necessary.
751  if (null !== $a_anchor) {
752  $target_url .= "#$a_anchor";
753  }
754 
755  $this->redirectToURL($target_url);
756  }
getClassByObject($object)
Helper function that returns the class name of a mixed (object or string) parameter.
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 349 of file class.ilCtrl.php.

References getClassByObject(), and saveParameterByClass().

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

349  : void
350  {
351  $this->saveParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter);
352  }
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 357 of file class.ilCtrl.php.

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

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

◆ setCmd()

ilCtrl::setCmd ( ?string  $a_cmd)

Implements ilCtrlInterface.

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

Referenced by ilObjectCopyGUI\keepObjectsInClipboard().

289  : void
290  {
291  if (!empty($a_cmd)) {
292  $this->context->setCmd($a_cmd);
293  } else {
294  $this->context->setCmd(null);
295  }
296  }
+ Here is the caller graph for this function:

◆ setCmdClass()

ilCtrl::setCmdClass (   $a_cmd_class)

Implements ilCtrlInterface.

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

Referenced by ilColumnGUI\addBlock().

313  : void
314  {
315  if (!empty($a_cmd_class)) {
316  $this->context->setCmdClass($a_cmd_class);
317  } else {
318  $this->context->setCmdClass(null);
319  }
320  }
+ Here is the caller graph for this function:

◆ setContextObject()

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

Implements ilCtrlInterface.

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

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

◆ setParameter()

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

Implements ilCtrlInterface.

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

References getClassByObject(), and setParameterByClass().

Referenced by ilObjBlogGUI\addHeaderActionForCommand(), ilObjMediaCastGUI\addMobsToCast(), ilObjWikiGUI\addPagesSubTabs(), ilObjWikiGUI\addPageTabs(), ilPCDataTableGUI\afterCreation(), ilPCTabsGUI\afterCreation(), ilSurveyPageEditGUI\callEditor(), ilObjMediaPoolGUI\cancelFolderUpdate(), ilInternalLinkGUI\changeLinkType(), ilInternalLinkGUI\changeTargetObject(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilNoteGUI\confirmDelete(), ilLMPageObjectGUI\create(), ilSurveyPageEditGUI\deleteBlock(), ilSkillTreeNodeGUI\deleteNodes(), ilNoteGUI\deleteNote(), ilSurveyPageEditGUI\deleteQuestion(), ilRatingCategoryGUI\edit(), ilObjStyleSheetGUI\editColorObject(), ilStructureObjectGUI\editMasterLanguage(), ilObjContentObjectGUI\editMasterLanguage(), ilObjStyleSheetGUI\editMediaQueryObject(), ilObjStyleSheetGUI\editTemplateObject(), ilGroupAddToGroupActionGUI\executeCommand(), ilColumnGUI\executeCommand(), ilLMGlossaryTableGUI\fillRow(), ilLMMenuItemsTableGUI\fillRow(), ilSkillLevelProfileAssignmentTableGUI\fillRow(), ilTaxonomyListTableGUI\fillRow(), ilRatingCategoryTableGUI\fillRow(), ilHelpModuleTableGUI\fillRow(), ilBookingSchedulesTableGUI\fillRow(), ilStyleMediaQueryTableGUI\fillRow(), ilSettingsTemplateTableGUI\fillRow(), ilStyleColorTableGUI\fillRow(), ilTableTemplatesTableGUI\fillRow(), ilBadgeImageTemplateTableGUI\fillRow(), ilExerciseVerificationTableGUI\fillRow(), ilPageLayoutTableGUI\fillRow(), ilContSkillMemberTableGUI\fillRow(), ilSurveySkillTableGUI\fillRow(), ilSkillProfileTableGUI\fillRow(), ilSurveySkillAssignmentTableGUI\fillRow(), ilExcCriteriaTableGUI\fillRow(), ilCopySelfAssQuestionTableGUI\fillRow(), ilTaxonomyTableGUI\fillRow(), ilNewItemGroupTableGUI\fillRow(), ilContProfileTableGUI\fillRow(), ilSkillLevelTableGUI\fillRow(), ilExcCriteriaCatalogueTableGUI\fillRow(), ilWorkspaceAccessTableGUI\fillRow(), ilObjectBadgeTableGUI\fillRow(), ilAssignmentsPerParticipantTableGUI\fillRow(), ilParticipantsPerAssignmentTableGUI\fillRow(), ilNoteGUI\getCommentsHTML(), ilNoteGUI\getCommentsWidget(), ilLikeGUI\getHTML(), ilColumnGUI\getHTML(), ilDashboardRecommendedContentGUI\getListItemGroups(), ilMaterialExplorer\getNodeHref(), ilNoteGUI\getNotesHTML(), ilPortfolioRepositoryGUI\getPortfolioList(), ilInternalLinkGUI\init(), ilExAssignmentEditorGUI\initAssignmentForm(), ilObjBookingPoolGUI\initHeaderAction(), ilBookingGatewayGUI\initPool(), ilSkillProfileGUI\initProfileForm(), ilStructureObjectGUI\insertTemplate(), ilExAssignmentEditorGUI\listAssignmentsObject(), ilMediaCreationGUI\listPoolItems(), ilPageEditorGUI\pasteFromClipboard(), ilPCContentIncludeGUI\poolSelection(), ilTaggingClassificationProvider\render(), ilLearningHistoryGUI\renderButton(), ilContainerRenderer\renderHelperGeneric(), ilObjBlogGUI\renderToolbarNavigation(), ilInternalLinkGUI\resetLinkList(), ilObjMediaPoolGUI\returnFromItem(), ilObjContentObjectGUI\savePageLayout(), ilExerciseManagementGUI\selectAssignmentObject(), ilExerciseManagementGUI\selectParticipantObject(), ilPCContentIncludeGUI\selectPool(), ilPCMediaObjectGUI\selectPool(), ilPCQuestionGUI\selectPool(), ilMediaCreationGUI\selectPool(), ilPersonalSkillsGUI\selectProfile(), ilInternalLinkGUI\selectRepositoryItem(), ilSurveySkillThresholdsGUI\selectSkill(), ilObjMediaPoolGUI\setContentSubTabs(), ilInternalLinkGUI\setMedPoolFolder(), ilTable2GUI\setOrderLink(), ilObjContentObjectGUI\setPageLayoutInHierarchy(), ilRepositorySelectorInputGUI\showRepositorySelection(), ilStructureObjectGUI\switchToLanguage(), and ilObjContentObjectGUI\switchToLanguage().

373  : void
374  {
375  $this->setParameterByClass($this->getClassByObject($a_gui_obj), $a_parameter, $a_value);
376  }
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 381 of file class.ilCtrl.php.

Referenced by ilObjCmiXapiVerificationGUI\_goto(), ilObjLTIConsumerVerificationGUI\_goto(), ilObjCourseVerificationGUI\_goto(), ilObjCourseReferenceGUI\_goto(), ilObjCmiXapiGUI\_goto(), ilLMPageObjectGUI\_goto(), ilStructureObjectGUI\_goto(), ilGlossaryTermGUI\_goto(), ilObjLTIConsumerGUI\_goto(), ilObjWorkspaceFolderGUI\_goto(), ilObjSurveyGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilObjPortfolioGUI\_goto(), ilObjWikiGUI\_goto(), ilObjGlossaryGUI\_goto(), ilObjMediaCastGUI\_goto(), ilObjMediaPoolGUI\_goto(), ilObjLinkResourceGUI\_goto(), ilObjQuestionPoolGUI\_goto(), ilObjContentObjectGUI\_goto(), ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObjectGUI\_gotoSharedWorkspaceNode(), ilObjUserGUI\addAdminLocatorItems(), ilGlossaryTermGUI\addDefinition(), ilPCFileListGUI\addFileItem(), ilContainerSessionsContentGUI\addFooterRow(), ilBlockGUI\addRepoCommands(), ilBasicSkillGUI\afterSave(), ilBasicSkillTemplateGUI\afterSave(), ilSkillTemplateReferenceGUI\afterSave(), ilObjWikiGUI\cancelCreationPageUsingTemplateObject(), ilObjPortfolioTemplateGUI\createFromTemplate(), ilExSubmissionObjectGUI\createPortfolioFromAssignmentObject(), ilObjExerciseVerificationGUI\downloadFromPortfolioPage(), ilObjSkillTreeGUI\editSkills(), ilObjSkillManagementGUI\editSkillTemplates(), ilObjSkillTreeGUI\editSkillTemplates(), ilFoundUsersTableGUI\fillRow(), ilPersonalSkillTableGUI\fillRow(), ilLinksTableGUI\fillRow(), ilContentStylesTableGUI\fillRow(), ILIAS\Skill\Tree\SkillTreeTableGUI\fillRow(), ilContProfileTableGUI\fillRow(), ilSkillCatTableGUI\fillRow(), ilBookingParticipantsTableGUI\fillRow(), ilObjLearningSequenceGUI\forwardByClass(), 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(), ilBlockGUI\getPaginationViewControl(), ilPortfolioRepositoryGUI\getPortfolioList(), ilNoteGUI\getShyButton(), ilExAssignmentGUI\getSubmissionLink(), ilBlogPostingGUI\getTabs(), ilPortfolioTemplatePageGUI\getViewPageLink(), ilPortfolioPageGUI\getViewPageLink(), ilBookingPreferencesGUI\listBookingResults(), ilWikiPageGUI\postOutputProcessing(), ilObjFileBasedLMGUI\redirectAfterCreation(), ilContainerReferenceGUI\redirectObject(), ilBasicSkillTemplateGUI\redirectToParent(), ilSkillTemplateReferenceGUI\redirectToParent(), ilObjSessionGUI\redirectToParentContentPageObject(), ilRepositoryGUI\redirectToRoot(), ilKSDocumentationGotoLink\redirectWithGotoLink(), ilFavouritesListGUI\render(), ilRepositorySelector2InputGUI\render(), ilObjBlogGUI\renderToolbarNavigation(), setParameter(), ilObjSkillTreeGUI\showLocator(), ilObjWikiGUI\showTemplateSelectionObject(), and ilExerciseManagementGUI\waitingDownloadObject().

381  : void
382  {
383  $this->structure->setTemporaryParameterByClass($a_class, $a_parameter, $a_value);
384  }
+ Here is the caller graph for this function:

◆ setReturn()

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

Implements ilCtrlInterface.

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

References getClassByObject(), and setReturnByClass().

Referenced by ilBookingGatewayGUI\executeCommand().

716  : void
717  {
718  $this->setReturnByClass($this->getClassByObject($a_gui_obj), $a_cmd);
719  }
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 724 of file class.ilCtrl.php.

References getLinkTargetByClass().

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

724  : void
725  {
726  $this->structure->setReturnTargetByClass(
727  $a_class,
728  $this->getLinkTargetByClass(
729  $a_class,
730  $a_cmd
731  )
732  );
733  }
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)

Field Documentation

◆ $component_factory

ilComponentFactory ilCtrl::$component_factory
private

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

Referenced by __construct().

◆ $context

ilCtrlContextInterface ilCtrl::$context
private

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

Referenced by __construct(), and getHTML().

◆ $exec_object

object ilCtrl::$exec_object = null
private

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

Referenced by getHTML().

◆ $get_parameters

RequestWrapper ilCtrl::$get_parameters
private

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

Referenced by __construct().

◆ $path_factory

ilCtrlPathFactoryInterface ilCtrl::$path_factory
private

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

Referenced by __construct().

◆ $post_parameters

RequestWrapper ilCtrl::$post_parameters
private

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

Referenced by __construct().

◆ $query_parser

ilCtrlQueryParserInterface ilCtrl::$query_parser
private

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

Referenced by __construct().

◆ $refinery

Refinery ilCtrl::$refinery
private

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

Referenced by __construct().

◆ $response_sender

ResponseSenderStrategy ilCtrl::$response_sender
private

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

Referenced by __construct().

◆ $server_request

ServerRequestInterface ilCtrl::$server_request
private

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

Referenced by __construct().

◆ $stacktrace

array ilCtrl::$stacktrace = []
private

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

Referenced by getCallHistory().

◆ $structure

ilCtrlStructureInterface ilCtrl::$structure
private

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

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

◆ $token_repository

ilCtrlTokenRepositoryInterface ilCtrl::$token_repository
private

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

Referenced by __construct().


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