ILIAS  Release_4_2_x_branch Revision 61807
 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 23583 2010-04-21 10:49:09Z smeyer

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\__renderEvent(), ilCourseContentGUI\__renderItem(), _getStaticLink(), ilCalendarCategoryGUI\addReferenceLinks(), ilObjGlossaryGUI\addUsagesToInfo(), ilCalendarExport\buildAppointmentUrl(), ilSurveySyncTableGUI\buildPath(), ilLPTableBaseGUI\buildPath(), ilObjectGUI\cloneAllObject(), ilObjectCopyGUI\copySingleObject(), ilObjGroupGUI\createMailSignature(), ilObjCourseGUI\createMailSignature(), ilMailNotification\createPermanentLink(), ilCourseContentGUI\editTimings(), ilConditionHandlerTableGUI\fillRow(), ilECSReleasedContentTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilLPCollectionSettingsTableGUI\fillRow(), ilTrSummaryTableGUI\fillRow(), ilLPTableBaseGUI\getExportMeta(), ilObjMediaPoolSubItemListGUI\getHTML(), ilObjGlossarySubItemListGUI\getHTML(), ilPathGUI\getHTML(), ilNavigationHistory\getItems(), ilMainMenuGUI\getMemberViewHTML(), ilMembershipRegistrationCodeUtils\handleCode(), ilObjCourseGUI\initEditForm(), ilObjGroupGUI\initForm(), ilWikiUtil\sendNotification(), ilCourseContentGUI\showStartObjects(), ilObjCourseGUI\showStartObjects(), and ilECSContentWriter\updateJSON().

{
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;
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 59 of file class.ilLink.php.

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

Referenced by ilInfoScreenGUI\addObjectSections(), ilShopRepositoryExplorer\buildLinkTarget(), ilRepositoryExplorer\buildLinkTarget(), ilObjectListGUI\createDefaultCommand(), ilWikiHandlerGUI\executeCommand(), ilTermUsagesTableGUI\fillRow(), ilMediaPoolPageUsagesTableGUI\fillRow(), ilMediaObjectUsagesTableGUI\fillRow(), ilPortfolioTableGUI\fillRow(), ilChatroom\getChatURL(), ilObjBlogGUI\getExerciseInfo(), ilObjPortfolioGUI\getExerciseInfo(), ilWorkspaceAccessHandler\getGotoLink(), ilCalendarAppointmentPanelGUI\getHTML(), ilPermanentLinkGUI\getHTML(), ilECSAppEventListener\handleEvent(), ilMainMenuGUI\renderEntry(), ilECSContentWriter\sendNewContentNotification(), ilCalendarAppointmentGUI\showInfoScreen(), and ilMailAddressbookGUI\submitInvitation().

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