ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilLink Class Reference

Class for creating internal links on e.g repostory items. More...

+ Collaboration diagram for ilLink:

Static Public Member Functions

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

Detailed Description

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
Version
$Id$

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

Member Function Documentation

◆ _getLink()

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

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

18 {
19 global $ilObjDataCache;
20
21 if(!strlen($a_type))
22 {
23 $a_type = $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_ref_id));
24 }
25 $param_string = '';
26 if(count($a_params))
27 {
28 foreach($a_params as $name => $value)
29 {
30 $param_string .= ('&'.$name.'='.$value);
31 }
32 }
33 switch($a_type)
34 {
35 case 'git':
36 //case 'pg':
37 return ILIAS_HTTP_PATH.'/'.IL_INTERNAL_LINK_SCRIPT.'?client_id='.CLIENT_ID.$param_string.$append;
38
39 default:
40 return ILIAS_HTTP_PATH.'/'.IL_INTERNAL_LINK_SCRIPT.'?target='.$a_type.'_'.$a_ref_id.$append.'&client_id='.CLIENT_ID.$param_string;
41 }
42 }
$a_type
Definition: workflow.php:93

References $a_type, and IL_INTERNAL_LINK_SCRIPT.

Referenced by ilCourseContentGUI\__renderItem(), _getStaticLink(), ilObjExternalFeedGUI\_goto(), ilObjItemGroupGUI\_goto(), ilObjPollGUI\_goto(), assQuestionGUI\addBackTab(), ilCalendarCategoryGUI\addReferenceLinks(), ilECSCourseCreationHandler\addUrlEntry(), ilObjGlossaryGUI\addUsagesToInfo(), ilSurveyExecutionGUI\backToRepository(), ilObjectOwnershipManagementTableGUI\buildActions(), ilCalendarExport\buildAppointmentUrl(), ilSurveySyncTableGUI\buildPath(), ilRepUtilGUI\buildPath(), ilLPTableBaseGUI\buildPath(), assQuestionGUI\cancelSync(), ilObjectGUI\cloneAllObject(), ilObjectCopyGUI\copyMultipleNonContainer(), ilObjCourseGUI\createMailSignature(), ilObjGroupGUI\createMailSignature(), ilMembershipMailGUI\createMailSignature(), ilLinkChecker\createPermanentLink(), ilMailNotification\createPermanentLink(), ilObjTestGUI\createUserResults(), ilCourseContentGUI\editTimings(), ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjGroupGUI\executeCommand(), ilObjSessionGUI\executeCommand(), ilForumPostingDraftsBlockGUI\fillDataSection(), ilConditionHandlerTableGUI\fillRow(), ilCourseObjectivesTableGUI\fillRow(), ilAvailableRolesStatusTableGUI\fillRow(), ilUsersOnlineBlockGUI\fillRow(), ilLPCollectionSettingsTableGUI\fillRow(), ilTrSummaryTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilECSReleasedContentTableGUI\fillRow(), ilObjectTableGUI\fillRow(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), ilObjContentObjectGUI\getBlockedUsersMailSignature(), ilTestRandomQuestionSetConfig\getCommaSeparatedSourceQuestionPoolLinks(), ilLPTableBaseGUI\getExportMeta(), ilCalendarAppointmentPanelGUI\getHTML(), ilObjGlossarySubItemListGUI\getHTML(), ilObjMediaPoolSubItemListGUI\getHTML(), ilPathGUI\getHTML(), ilObjectBadgeTableGUI\getItems(), ilNavigationHistory\getItems(), ilECSObjectSettings\getJsonCore(), ilBlogNewsRendererGUI\getObjectLink(), ilForumNewsRendererGUI\getObjectLink(), ilLearningModuleNewsRendererGUI\getObjectLink(), ilWikiNewsRendererGUI\getObjectLink(), ilNewsDefaultRendererGUI\getObjectLink(), ilObjTestDynamicQuestionSetConfig\getSourceQuestionPoolLink(), ilObjSurvey\getSurveyCodesForExport(), ilObjSurvey\getSurveyCodesTableData(), ilLPCollectionOfLMChapters\getTableGUIData(), ilObjTestGUI\getTabs(), ilObjItemGroupGUI\gotoParent(), ilMembershipRegistrationCodeUtils\handleCode(), ilLPListOfSettingsGUI\handleLPUsageInfo(), ilTestServiceGUI\handleTabs(), ilLMPresentationGUI\ilPage(), ilObjCourseGUI\initEditForm(), ilObjGroupGUI\initForm(), ilTaxonomyAdministrationRepositoryTableGUI\initItems(), ilMainMenuGUI\initMemberView(), ilObjAssessmentFolderGUI\logAdminObject(), ilTestSkillEvaluationGUI\manageTabs(), ilPCContentInclude\modifyPageContentPostXsl(), ilConsultationHoursTableGUI\parse(), ilObjMediaPoolSubItemListGUI\parseImage(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilObjQuestionPoolGUI\questionsObject(), ilExerciseManagementGUI\redirectFeedbackMailObject(), ilObjCourseGUI\redirectLocToTestConfirmedObject(), ilObjCourseGUI\redirectLocToTestObject(), ilPortfolioPageGUI\renderMyCourses(), ilPersonalSkillsGUI\renderSuggestedResources(), ilObjExercise\sendAssignment(), ilObjSurvey\sendCodes(), ilLPTableBaseGUI\sendMail(), ilMembershipCronMinMembers\sendMessage(), ilWikiUtil\sendNotification(), ilBadgeHandler\sendNotification(), ilNote\sendNotifications(), ilObjSurveyGUI\sendUserResultsMail(), ilObjItemGroupGUI\setTabs(), ilLMPresentationGUI\showPreconditionsOfPage(), ilCourseContentGUI\showStartObjects(), ilNoteGUI\showTargets(), ilObjPollGUI\subscribe(), assQuestionGUI\sync(), ilObjPortfolioGUI\toRepository(), ilObjPollGUI\unsubscribe(), and ilObjPollGUI\vote().

+ Here is the caller graph for this function:

◆ _getStaticLink()

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

Get static link.

@access public

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

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

57 {
58 global $ilObjDataCache;
59
60 if(!strlen($a_type))
61 {
62 $a_type = $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_ref_id));
63 }
64
65 include_once('Services/PrivacySecurity/classes/class.ilRobotSettings.php');
66 $robot_settings = ilRobotSettings::_getInstance();
67 if(!$robot_settings->robotSupportEnabled())
68 {
69 if($a_fallback_goto)
70 {
71 return ilLink::_getLink($a_ref_id,$a_type,array(),$append);
72 }
73 else
74 {
75 return false;
76 }
77 }
78
79 // urlencode for append is needed e.g. to process "/" in wiki page names correctly
80 return ILIAS_HTTP_PATH.'/goto_'.urlencode(CLIENT_ID).'_'.$a_type.'_'.$a_ref_id.urlencode($append).'.html';
81 }
static _getInstance()
Get instance.

References $a_type, ilRobotSettings\_getInstance(), and _getLink().

Referenced by ilObjFileAccess\_getPermanentDownloadLink(), ilTemplate\addILIASFooter(), ilRepositoryExplorer\buildLinkTarget(), ilContactUserActionProvider\collectActionsForTargetUser(), ilObjectListGUI\createDefaultCommand(), ilObjBlog\deliverRSS(), ilSurveyParticipantsGUI\editRatersObject(), ilSurveyEvaluationGUI\evaluation(), ilWikiHandlerGUI\executeCommand(), ilTermUsagesTableGUI\fillRow(), ilMediaPoolPageUsagesTableGUI\fillRow(), ilMediaObjectUsagesTableGUI\fillRow(), ilSkillLevelTableGUI\fillRow(), ilWorkspaceShareTableGUI\fillRow(), ilChatroom\getChatURL(), ilPublicUserProfileGUI\getEmbeddable(), ilBlogExerciseGUI\getExerciseInfo(), ilPortfolioExerciseGUI\getExerciseInfo(), ilDclIliasReferenceRecordFieldModel\getExportValue(), ilWorkspaceAccessHandler\getGotoLink(), ilCalendarAppointmentPanelGUI\getHTML(), ilObjLinkResourceSubItemListGUI\getHTML(), ilPermanentLinkGUI\getHTML(), ilDclIliasReferenceRecordRepresentation\getLinkHTML(), ilRepositoryExplorerGUI\getNodeHref(), ilUserUtil\getStartingPointAsUrl(), ilObjLinkResourceGUI\handleSubItemLinks(), ilSurveyParticipantsGUI\mailRatersActionObject(), ilObjPortfolioBaseGUI\preview(), ilMainMenuGUI\renderEntry(), ilObjBlogGUI\renderFullScreen(), ilObjBlogGUI\renderList(), ilBuddySystemNotification\send(), ilRegistrationMailNotification\send(), ilMembershipCronNotifications\sendMail(), ilRemoteObjectBase\sendNewContentNotification(), ilECSObjectSettings\sendNewContentNotification(), ilNote\sendNotifications(), ilObjSurvey\sendTutorNotification(), ilObjSurvey\sentReminder(), ilCalendarAppointmentGUI\showInfoScreen(), and ilContactGUI\submitInvitation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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