ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.

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:
class.ilLink.php 40458 2013-03-08 11:00:57Z akill

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

Member Function Documentation

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

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

References IL_INTERNAL_LINK_SCRIPT.

Referenced by ilShopResultPresentationGUI\__appendChildLinks(), ilCourseContentGUI\__renderItem(), _getStaticLink(), ilObjItemGroupGUI\_goto(), ilObjPollGUI\_goto(), ilCalendarCategoryGUI\addReferenceLinks(), ilECSCourseCreationHandler\addUrlEntry(), ilObjGlossaryGUI\addUsagesToInfo(), ilSurveyExecutionGUI\backToRepository(), ilObjectOwnershipManagementTableGUI\buildActions(), ilCalendarExport\buildAppointmentUrl(), ilSurveySyncTableGUI\buildPath(), ilLPTableBaseGUI\buildPath(), ilRepUtilGUI\buildPath(), ilObjectGUI\cloneAllObject(), ilObjectCopyGUI\copyMultipleNonContainer(), ilObjectCopyGUI\copySingleObject(), ilObjGroupGUI\createMailSignature(), ilObjCourseGUI\createMailSignature(), ilLinkChecker\createPermanentLink(), ilMailNotification\createPermanentLink(), ilCourseContentGUI\editTimings(), ilConditionHandlerTableGUI\fillRow(), ilECSReleasedContentTableGUI\fillRow(), ilLPCollectionSettingsTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilTrSummaryTableGUI\fillRow(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), ilLPTableBaseGUI\getExportMeta(), ilObjMediaPoolSubItemListGUI\getHTML(), ilObjGlossarySubItemListGUI\getHTML(), ilCalendarAppointmentPanelGUI\getHTML(), ilPathGUI\getHTML(), ilNavigationHistory\getItems(), ilECSObjectSettings\getJsonCore(), ilMainMenuGUI\getMemberViewHTML(), ilObjSurvey\getSurveyCodesForExport(), ilObjSurvey\getSurveyCodesTableData(), ilLPCollectionOfLMChapters\getTableGUIData(), ilObjItemGroupGUI\gotoParent(), ilMembershipRegistrationCodeUtils\handleCode(), ilObjCourseGUI\initEditForm(), ilObjGroupGUI\initForm(), ilObjiLincCourseGUI\mailMembersObject(), ilConsultationHoursTableGUI\parse(), ilObjMediaPoolSubItemListGUI\parseImage(), ilPersonalSkillsGUI\renderSuggestedResources(), ilObjSurvey\sendCodes(), ilObjDataCollection\sendNotification(), ilWikiUtil\sendNotification(), ilObjItemGroupGUI\setTabs(), ilCourseContentGUI\showStartObjects(), ilObjCourseGUI\showStartObjects(), ilObjPortfolioGUI\toRepository(), and ilObjPollGUI\vote().

{
global $ilObjDataCache;
if(!strlen($a_type))
{
$a_type = $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_ref_id));
}
if(count($a_params))
{
$param_string;
foreach($a_params as $name => $value)
{
$param_string .= ('&'.$name.'='.$value);
}
}
else
{
$param_string = '';
}
switch($a_type)
{
case 'git':
return ILIAS_HTTP_PATH.'/'.IL_INTERNAL_LINK_SCRIPT.'?client_id='.CLIENT_ID.$param_string.$append;
default:
return ILIAS_HTTP_PATH.'/'.IL_INTERNAL_LINK_SCRIPT.'?target='.$a_type.'_'.$a_ref_id.$append.'&client_id='.CLIENT_ID.$param_string;
}
}

+ Here is the caller graph for this function:

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

Get static link.

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 58 of file class.ilLink.php.

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

Referenced by ilObjFileAccess\_getPermanentDownloadLink(), ilTemplate\addILIASFooter(), ilInfoScreenGUI\addObjectSections(), ilShopRepositoryExplorer\buildLinkTarget(), ilRepositoryExplorer\buildLinkTarget(), ilObjLinkResourceGUI\callDirectLink(), ilObjLinkResourceGUI\callLink(), ilObjectListGUI\createDefaultCommand(), ilObjBlog\deliverRSS(), ilWikiHandlerGUI\executeCommand(), ilTermUsagesTableGUI\fillRow(), ilMediaPoolPageUsagesTableGUI\fillRow(), ilMediaObjectUsagesTableGUI\fillRow(), ilSkillLevelTableGUI\fillRow(), ilWorkspaceShareTableGUI\fillRow(), ilChatroom\getChatURL(), ilObjPortfolioGUI\getExerciseInfo(), ilObjBlogGUI\getExerciseInfo(), ilDataCollectionILIASRefField\getExportValue(), ilWorkspaceAccessHandler\getGotoLink(), ilObjLinkResourceSubItemListGUI\getHTML(), ilCalendarAppointmentPanelGUI\getHTML(), ilPermanentLinkGUI\getHTML(), ilDataCollectionILIASRefField\getLinkHTML(), ilRepositoryExplorerGUI\getNodeHref(), ilUserUtil\getStartingPointAsUrl(), ilSurveyParticipantsGUI\mailRatersActionObject(), ilObjPortfolioBaseGUI\preview(), ilMainMenuGUI\renderEntry(), ilObjBlogGUI\renderFullScreen(), ilObjBlogGUI\renderList(), ilRegistrationMailNotification\send(), ilECSObjectSettings\sendNewContentNotification(), ilRemoteObjectBase\sendNewContentNotification(), ilObjSurvey\sendTutorNotification(), ilObjSurvey\sentReminder(), and ilCalendarAppointmentGUI\showInfoScreen().

{
global $ilObjDataCache;
if(!strlen($a_type))
{
$a_type = $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_ref_id));
}
include_once('Services/PrivacySecurity/classes/class.ilRobotSettings.php');
$robot_settings = ilRobotSettings::_getInstance();
if(!$robot_settings->robotSupportEnabled())
{
if($a_fallback_goto)
{
return ilLink::_getLink($a_ref_id,$a_type,array(),$append);
}
else
{
return false;
}
}
// urlencode for append is needed e.g. to process "/" in wiki page names correctly
return ILIAS_HTTP_PATH.'/goto_'.urlencode(CLIENT_ID).'_'.$a_type.'_'.$a_ref_id.urlencode($append).'.html';
}

+ 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: