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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilLink:

Static Public Member Functions

static _getLink (?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
 
static _getStaticLink (?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
 Get static link. More...
 

Protected Attributes

const LINK_SCRIPT = "goto.php"
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class for creating internal links on e.g repostory items. This class uses goto.php to create permanent links

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 25 of file class.ilLink.php.

Member Function Documentation

◆ _getLink()

static ilLink::_getLink ( ?int  $a_ref_id,
string  $a_type = '',
array  $a_params = array(),
string  $append = "" 
)
static

Definition at line 29 of file class.ilLink.php.

References $DIC, $name, and CLIENT_ID.

Referenced by ilObjItemGroupGUI\_goto(), ilObjCmiXapiGUI\_goto(), ilObjPollGUI\_goto(), ilObjLTIConsumerGUI\_goto(), ilInfoScreenGUI\addPreconditionSection(), ilCalendarCategoryGUI\addReferenceLinks(), ilLocatorGUI\addRepositoryItems(), ilObjectGUI\addToDeskObject(), ilObjContentPageGUI\addToNavigationHistory(), ilObjIndividualAssessmentGUI\addToNavigationHistory(), ilObjLearningSequenceGUI\addToNavigationHistory(), ilObjStudyProgrammeGUI\addToNavigationHistory(), ilECSCourseCreationHandler\addUrlEntry(), ilObjGlossaryGUI\addUsagesToInfo(), ilSurveyExecutionGUI\backToRepository(), ilObjectOwnershipManagementTableGUI\buildActions(), ilCalendarExport\buildAppointmentUrl(), ilObjLTIConsumer\buildContentSelectionParameters(), ilAppointmentPresentationExerciseGUI\buildDirectLinkForAppointment(), ilObjLTIConsumer\buildLaunchParameters(), ilObjLTIConsumer\buildLaunchParametersLTI13(), ilLTIConsumerProviderUsageTableGUI\buildLinkToUsedBy(), ilSurveySyncTableGUI\buildPath(), ilRepositoryTrashGUI\buildPath(), ilLPTableBaseGUI\buildPath(), assQuestionGUI\cancelSync(), ilObjectGUI\checkPermission(), ilExAssignmentReminder\checkReminders(), ilAppointmentPresentationSessionGUI\collectPropertiesAndActions(), ilObjectCopyGUI\copyContainerToTargets(), ilObjectCopyGUI\copyMultipleNonContainer(), ilGroupAddToGroupActionGUI\createGroupAndAddUser(), ilMembershipMailGUI\createMailSignature(), ilStudyProgrammeMailMemberSearchGUI\createMailSignature(), ilObjLearningSequenceGUI\createMailSignature(), ilObjGroupGUI\createMailSignature(), ilObjSessionGUI\createMailSignature(), ilObjCourseGUI\createMailSignature(), ilMailNotification\createPermanentLink(), ilParticipantsTestResultsGUI\createUserResults(), ilObjDataCollection\doUpdate(), ilObjSAHSLearningModuleGUI\executeCommand(), ilObjectPluginGUI\executeCommand(), ilPortfolioRepositoryGUI\executeCommand(), ilObjGroupGUI\executeCommand(), ilObjCategoryGUI\executeCommand(), ilObjSessionGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilECSExportedContentTableGUI\fillRow(), ilConditionHandlerTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilAvailableRolesStatusTableGUI\fillRow(), ilAdvancedMDRecordTableGUI\fillRow(), ilCourseObjectivesTableGUI\fillRow(), ilLPCollectionSettingsTableGUI\fillRow(), ilDidacticTemplateSettingsTableGUI\fillRow(), ilRoleAssignmentTableGUI\fillRow(), ilObjectTableGUI\fillRow(), ilMediaPoolPageUsagesTableGUI\fillRow(), ilTrSummaryTableGUI\fillRow(), ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getAction(), ilPersonalSkillsGUI\getAllSuggestedResources(), ilObjectListGUI\getAsCard(), ilExerciseGSToolProvider\getAssignmentInfo(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), ilObjContentObjectGUI\getBlockedUsersMailSignature(), ilCourseMailTemplateMemberContext\getCachedPeriodByObjId(), ilCourseMailTemplateTutorContext\getCachedPeriodByObjId(), ilTestRandomQuestionSetConfig\getCommaSeparatedSourceQuestionPoolLinks(), ilScormMailTemplateLPContext\getDescription(), ilSurveyMailTemplateReminderContext\getDescription(), ilBadgeLearningHistoryProvider\getEntries(), ilPersonalSkillsGUI\getEvalItem(), ilLPTableBaseGUI\getExportMeta(), ilObjMediaPoolSubItemListGUI\getHTML(), ilObjGlossarySubItemListGUI\getHTML(), ilADTInternalLinkPresentationBridge\getHTML(), ilCalendarAppointmentPanelGUI\getHTML(), ilPathGUI\getHTML(), ilTimingsCronReminder\getInformationForRefId(), ilObjectBadgeTableGUI\getItems(), ilNavigationHistory\getItems(), ilECSObjectSettings\getJsonCore(), ilLearningModuleNotification\getLink(), ilDashboardLearningSequenceGUI\getLinkedTitle(), ilExcRepoObjAssignmentInfo\getLinks(), ilObjAssessmentFolderGUI\getLogDataOutputForm(), ILIAS\Container\Screen\MemberViewLayoutProvider\getMemberViewModeInfo(), ilBlogNewsRendererGUI\getObjectLink(), ilLearningModuleNewsRendererGUI\getObjectLink(), ilWikiNewsRendererGUI\getObjectLink(), ilForumNewsRendererGUI\getObjectLink(), ilNewsDefaultRendererGUI\getObjectLink(), ilContainerPageGUI\getProfileBackUrl(), ilObjForumGUI\getSafePostCommands(), ilObjTestDynamicQuestionSetConfig\getSourceQuestionPoolLink(), ilSurveyMailTemplateRaterInvitationContext\getSpecificPlaceholders(), ilStudyProgrammeMailTemplateContext\getSpecificPlaceholders(), ilObjLearningSequenceContentTableGUI\getStdLink(), ilPersonalSkillsGUI\getSuggestedResourcesForProfile(), ilObjSurvey\getSurveyCodesForExport(), ilObjSurvey\getSurveyCodesTableData(), ilLPCollectionOfLMChapters\getTableGUIData(), ilObjTestGUI\getTabs(), ilNoteGUI\getTarget(), ilObjSurveyGUI\getUserResultsPlain(), ilObjItemGroupGUI\gotoParent(), ilMembershipRegistrationCodeUtils\handleCode(), ilLPListOfSettingsGUI\handleLPUsageInfo(), ilObjCourseGUI\initEditForm(), ilObjGroupGUI\initForm(), ilTaxonomyAdministrationRepositoryTableGUI\initItems(), ilAssQuestionPreviewGUI\initQuestion(), ilBadgeProfileGUI\listBadges(), ilUserCertificateGUI\listCertificates(), ilObjAssessmentFolderGUI\logAdminObject(), ilPCContentInclude\modifyPageContentPostXsl(), ilConsultationHoursTableGUI\parse(), ilRbacLogTableGUI\parseChangesFaPa(), ilObjMediaPoolSubItemListGUI\parseImage(), ilTimingsPersonalTableGUI\parseTitle(), ilTimingsManageTableGUI\parseTitle(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilObjQuestionPoolGUI\questionsObject(), ilObjectGUI\redirectAfterCreation(), ilExerciseManagementGUI\redirectFeedbackMailObject(), ilObjCourseGUI\redirectLocToTestConfirmedObject(), ilObjCourseGUI\redirectLocToTestObject(), ilObjectGUI\removeFromDeskObject(), ilFavouritesListGUI\render(), ilLearningHistoryTimelineItem\render(), ilLMContentRendererGUI\renderFocusMessage(), ilCalendarSelectionBlockGUI\renderItem(), ilBadgeRenderer\renderModalContent(), ilPortfolioPageGUI\renderMyCourses(), ilExAssTypeWikiTeamGUI\renderOverviewContent(), ilLMContentRendererGUI\renderPreconditionsOfPage(), ilTaggingSlateContentGUI\renderResourcesForTag(), ilExcMailTemplateSubmitReminderContext\resolveSpecificPlaceholder(), ilExcMailTemplateGradeReminderContext\resolveSpecificPlaceholder(), ilExcMailTemplatePeerReminderContext\resolveSpecificPlaceholder(), ilObjSurvey\sendCodes(), ilLPTableBaseGUI\sendMail(), ilMembershipCronMinMembers\sendMessage(), ilWikiUtil\sendNotification(), ilBadgeHandler\sendNotification(), ILIAS\Notes\NotificationsManager\sendNotifications(), ilObjItemGroupGUI\setTabs(), ilObjectCopyGUI\showCopyProgress(), ilPersonalProfileGUI\showPublicProfileFields(), ilCourseContentGUI\showStartObjects(), ilObjPollGUI\subscribe(), assQuestionGUI\sync(), ilObjPortfolioGUI\toRepository(), ilObjPollGUI\unsubscribe(), ilObjExercise\update(), ilObjFileGUI\uploadFiles(), ilObjForumGUI\viewThreadObject(), and ilObjPollGUI\vote().

34  : string {
35  global $DIC;
36 
37  $ilObjDataCache = $DIC["ilObjDataCache"];
38  $objDefinition = $DIC['objDefinition'];
39 
40  if ($a_type === '' && !is_null($a_ref_id)) {
41  $a_type = $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_ref_id));
42  }
43  $param_string = '';
44  if (is_array($a_params) && count($a_params)) {
45  foreach ($a_params as $name => $value) {
46  $param_string .= ('&' . $name . '=' . $value);
47  }
48  }
49 
50  // workaround for administration links: https://mantis.ilias.de/view.php?id=33088
51  if (
52  $objDefinition->isAdministrationObject($a_type) &&
53  $param_string === '' &&
54  $append === ''
55  ) {
56  $determined_object_type = $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_ref_id));
57  // https://mantis.ilias.de/view.php?id=34853
58  if ($determined_object_type === $a_type) {
59  return ILIAS_HTTP_PATH . '/ilias.php?baseClass=ilAdministrationGUI&cmd=jump&ref_id=' . $a_ref_id;
60  }
61  }
62  return ILIAS_HTTP_PATH . '/' . self::LINK_SCRIPT . '?target=' . $a_type . '_' . $a_ref_id . $append . '&client_id=' . CLIENT_ID . $param_string;
63  }
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247
const CLIENT_ID
Definition: constants.php:41
+ Here is the caller graph for this function:

◆ _getStaticLink()

static ilLink::_getStaticLink ( ?int  $a_ref_id,
string  $a_type = '',
bool  $a_fallback_goto = true,
string  $append = "" 
)
static

Get static link.

Parameters
intreference id
stringobject type
boolfallback to goto.php if robots are disabled
Returns
string goto.html or goto.php link

Definition at line 72 of file class.ilLink.php.

References $DIC, CLIENT_ID, and ilRobotSettings\getInstance().

Referenced by ilObjFileAccess\_getPermanentDownloadLink(), ilAppointmentPresentationGUI\addContainerInfo(), ilLegacyKioskModeView\buildControls(), ilAppointmentPresentationGUI\buildDirectLinkForAppointment(), ilRepositoryExplorer\buildLinkTarget(), ilObjSurvey\checkReminder(), ilContactUserActionProvider\collectActionsForTargetUser(), ilAppointmentPresentationBookingPoolGUI\collectPropertiesAndActions(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilAppointmentPresentationGroupGUI\collectPropertiesAndActions(), ilAppointmentPresentationCourseGUI\collectPropertiesAndActions(), ilAppointmentPresentationSessionGUI\collectPropertiesAndActions(), ilObjLearningSequenceListGUI\createDefaultCommand(), ilObjectListGUI\createDefaultCommand(), ilObjPortfolioBaseGUI\deletePortfolioPages(), ilObjBlog\deliverRSS(), ilSurveyParticipantsGUI\editRatersObject(), ilSurveyEvaluationGUI\evaluation(), ilWikiHandlerGUI\executeCommand(), ilDataCollectionGlobalTemplate\fillFooter(), ilGlobalTemplate\fillFooter(), ilTermUsagesTableGUI\fillRow(), ilMediaPoolPageUsagesTableGUI\fillRow(), ilMediaObjectUsagesTableGUI\fillRow(), ilSkillLevelTableGUI\fillRow(), ilPDTasksBlockGUI\fillRow(), ilMStShowUserCoursesTableGUI\fillRow(), ilWorkspaceShareTableGUI\fillRow(), ilMStListCoursesTableGUI\fillRow(), ilChatroom\getChatURL(), ilStudyProgrammeMembersTableGUI\getCompletionLink(), ilPublicUserProfileGUI\getEmbeddable(), ilBlogExerciseGUI\getExerciseInfo(), ilPortfolioExerciseGUI\getExerciseInfo(), ilDclIliasReferenceRecordFieldModel\getExportValue(), ILIAS\UICore\PageContentProvider\getFooterModification(), ilWorkspaceAccessHandler\getGotoLink(), ILIAS\Repository\Provider\RepositoryMainBarProvider\getHomeItem(), ilCalendarAppointmentPanelGUI\getHTML(), ilPermanentLinkGUI\getHTML(), ilPDSelectedItemsBlockSelectedItemsViewGUI\getIntroductionHtml(), ilObjStudyProgrammeAutoCategoriesGUI\getItemPath(), ilObjCmiXapi\getLaunchData(), ilDclIliasReferenceRecordRepresentation\getLinkHTML(), ilPDTasksBlockGUI\getListItemForData(), ilRepositoryExplorerGUI\getNodeHref(), ilPDSelectedItemsBlockGUI\getNoItemFoundContent(), ilTaggingSlateContentGUI\getNoTagsUsedMessage(), ilPortfolioPageGUI\getPagePermaLink(), ILIAS\Portfolio\PortfolioPrintViewProviderGUI\getPages(), ILIAS\Survey\PrintView\ResultsPerUserPrintViewProviderGUI\getPrintHeader(), ILIAS\Survey\PrintView\ResultsDetailsPrintViewProviderGUI\getPrintHeader(), ilWebLinkItemInternal\getResolvedLink(), ilUserUtil\getStartingPoint(), ilBlogDraftsDerivedTaskProvider\getTasks(), ilObjStudyProgrammeAutoMembershipsGUI\getTitleRepresentation(), ilObjStudyProgrammeAutoCategoriesGUI\getUserRepresentation(), ilObjStudyProgrammeAutoMembershipsGUI\getUserRepresentation(), ilSurveyRaterGUI\mailRatersAction(), ilSurveyParticipantsGUI\mailRatersActionObject(), ilObjBlogGUI\renderFullScreen(), ilObjBlogGUI\renderList(), ilRegistrationMailNotification\send(), ilBuddySystemNotification\send(), ilSkillNotifications\sendMail(), ilMembershipCronNotifications\sendMail(), ilECSObjectSettings\sendNewContentNotification(), ilRemoteObjectBase\sendNewContentNotification(), ILIAS\Notes\NotificationsManager\sendNotifications(), ilObjSurvey\sendTutorNotification(), ilGlobalPageTemplate\setPermanentLink(), ilDerivedTasksGUI\show(), ilContactGUI\showContacts(), ilCalendarAppointmentGUI\showInfoScreen(), and ilContactGUI\submitInvitation().

77  : string {
78  global $DIC;
79 
80  $ilObjDataCache = $DIC["ilObjDataCache"];
81 
82  if ($a_type === '' && $a_ref_id) {
83  $a_type = $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_ref_id));
84  }
85 
86  $robot_settings = ilRobotSettings::getInstance();
87  if (!$robot_settings->robotSupportEnabled()) {
88  if ($a_fallback_goto) {
89  return self::_getLink($a_ref_id, $a_type, array(), $append);
90  }
91 
92  return false;
93  }
94 
95  // urlencode for append is needed e.g. to process "/" in wiki page names correctly
96  return ILIAS_HTTP_PATH . '/goto_' . urlencode(CLIENT_ID) . '_' . $a_type . '_' . $a_ref_id . urlencode($append) . '.html';
97  }
global $DIC
Definition: feed.php:28
static getInstance()
get singleton instance
const CLIENT_ID
Definition: constants.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ LINK_SCRIPT

const ilLink::LINK_SCRIPT = "goto.php"
protected

Definition at line 27 of file class.ilLink.php.


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