Class for creating internal links on e.g repostory items. More...
Public Member Functions | |
| _getLink ($a_ref_id, $a_type= '', $a_params=array()) | |
Static Public Member Functions | |
| static | _getStaticLink ($a_ref_id, $a_type= '', $a_fallback_goto=true) |
| Get static link. | |
Class for creating internal links on e.g repostory items.
This class uses goto.php to create permanent links
Definition at line 35 of file class.ilLink.php.
| ilLink::_getLink | ( | $ | a_ref_id, | |
| $ | a_type = '', |
|||
| $ | a_params = array() | |||
| ) |
Definition at line 37 of file class.ilLink.php.
Referenced by ilSearchResultPresentationGUI::__appendChildLinks(), ilCourseContentGUI::__renderItem(), ilLPListOfSettingsGUI::__showCollectionTable(), _getStaticLink(), ilObjectGUI::cloneAllObject(), ilCourseContentGUI::editTimings(), ilLPObjectItemListGUI::renderPath(), and ilCourseContentGUI::showStartObjects().
{
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.'?'.$param_string.'&client_id='.CLIENT_ID;
default:
return ILIAS_HTTP_PATH.'/'.IL_INTERNAL_LINK_SCRIPT.'?target='.$a_type.'_'.$a_ref_id.'&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 | |||
| ) | [static] |
Get static link.
public
| int | reference id | |
| string | object type | |
| bool | fallback to goto.php if robots are disabled |
Definition at line 79 of file class.ilLink.php.
References ilRobotSettings::_getInstance(), and _getLink().
Referenced by ilObjectListGUI::createDefaultCommand(), ilInfoScreenGUI::getHTML(), ilMainMenuGUI::setTemplateVars(), and ilContainerGUI::showPermanentLink().
{
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);
}
else
{
return false;
}
}
return ILIAS_HTTP_PATH.'/goto_'.urlencode(CLIENT_ID).'_'.$a_type.'_'.$a_ref_id.'.html';
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1