ILIAS  Release_3_10_x_branch Revision 61812
 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:

Public Member Functions

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

Static Public Member Functions

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 20226 2009-06-16 14:39:16Z akill

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

Member Function Documentation

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

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

References IL_INTERNAL_LINK_SCRIPT.

Referenced by ilSearchResultPresentationGUI\__appendChildLinks(), ilCourseContentGUI\__renderEvent(), ilCourseContentGUI\__renderItem(), ilLPListOfSettingsGUI\__showCollectionTable(), _getStaticLink(), ilCalendarCategoryGUI\addReferenceLinks(), ilObjectGUI\cloneAllObject(), ilCourseContentGUI\editTimings(), ilECSReleasedContentTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), 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 78 of file class.ilLink.php.

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

Referenced by ilInfoScreenGUI\addObjectSections(), ilObjectListGUI\createDefaultCommand(), 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: