ILIAS  Release_4_0_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 smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Version
Id:
class.ilLink.php 21744 2009-09-18 14:31:47Z 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 $name, and IL_INTERNAL_LINK_SCRIPT.

Referenced by ilShopResultPresentationGUI\__appendChildLinks(), ilCourseContentGUI\__renderEvent(), ilCourseContentGUI\__renderItem(), ilLPListOfSettingsGUI\__showCollectionTable(), _getStaticLink(), ilCalendarCategoryGUI\addReferenceLinks(), ilObjectGUI\cloneAllObject(), ilObjectCopyGUI\copySingleObject(), ilMailNotification\createPermanentLink(), ilCourseContentGUI\editTimings(), ilECSReleasedContentTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilObjMediaPoolSubItemListGUI\getHTML(), ilObjGlossarySubItemListGUI\getHTML(), ilPathGUI\getHTML(), ilMainMenuGUI\getMemberViewHTML(), ilLPObjectItemListGUI\renderPath(), 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':
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 ilInfoScreenGUI\addObjectSections(), ilObjectListGUI\createDefaultCommand(), ilMediaPoolPageUsagesTableGUI\fillRow(), ilMediaObjectUsagesTableGUI\fillRow(), ilCalendarAppointmentPanelGUI\getHTML(), ilPermanentLinkGUI\getHTML(), ilECSAppEventListener\handleEvent(), ilECSContentWriter\sendNewContentNotification(), ilMainMenuGUI\setTemplateVars(), 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: