19 declare(strict_types=1);
    32     public const LIST = 
"list";
    33     public const BOTH = 
"both";
    34     public const INT = 
"int";
    35     public const EXT = 
"ext";
    45         "page" => 
"PageObject",
    46         "chap" => 
"StructureObject",
    47         "term" => 
"GlossaryItem",
    56         string $a_postvar = 
""    60         $this->
ctrl = $DIC->ctrl();
    61         $this->
lng = $DIC->language();
    66         $this->obj_definition = $DIC[
"objDefinition"];
    68         $this->requested_postvar = $this->
str(
"postvar");
    78         $this->allowed_link_types = $a_val;
    96         $this->int_link_default_type = $a_type;
    97         $this->int_link_default_obj = $a_obj;
   107         $this->int_link_filter_types = $a_val;
   117         return self::$iltypemap;
   127         return array_flip(self::$iltypemap);
   137         $this->filter_white_list = $a_val;
   150         $this->external_link_max_length = $a_max;
   163         $next_class = $ilCtrl->getNextClass($this);
   164         $cmd = $ilCtrl->getCmd();
   167         switch ($next_class) {
   168             case "ilinternallinkgui":
   171                     $this->int_link_default_type,
   172                     $this->int_link_default_obj
   174                 foreach ($this->int_link_filter_types as $t) {
   175                     $link_gui->filterLinkType($t);
   179                 $ret = $ilCtrl->forwardCommand($link_gui);
   196         $this->value = $a_value;
   210         switch ($a_values[$this->
getPostVar() . 
"_mode"] ?? null) {
   212                 if ($a_values[$this->
getPostVar() . 
"_ajax_type"] &&
   213                     $a_values[$this->
getPostVar() . 
"_ajax_id"]) {
   214                     $val = $a_values[$this->
getPostVar() . 
"_ajax_type"] . 
"|" .
   216                     if ($a_values[$this->
getPostVar() . 
"_ajax_target"] != 
"") {
   217                         $val .= 
"|" . $a_values[$this->
getPostVar() . 
"_ajax_target"];
   252             if ($mode_type == 
"list") {
   265                     if (!$ajax_type || !$ajax_id) {
   285         $ajax_target = $this->
str($this->
getPostVar() . 
"_ajax_target");
   289         if ($mode == 
"int") {
   291             $val = $ajax_type . 
"|" . $ajax_id;
   292             if ($ajax_target != 
"") {
   293                 $val .= 
"|" . $ajax_target;
   296         } elseif ($mode == 
"no") {
   311         $hidden_target = null;
   314         $has_int = $has_ext = $has_radio = $has_list = 
false;
   351         $itpl = 
new ilTemplate(
'tpl.prop_link.html', 
true, 
true, 
'components/ILIAS/Form');
   355             $ilCtrl->setParameterByClass(
"ilformpropertydispatchgui", 
"postvar", $this->
getPostVar());
   356             $link = array(get_class($this->
getParentForm()), 
"ilformpropertydispatchgui", get_class($this), 
"ilinternallinkgui");
   357             $link = $ilCtrl->getLinkTargetByClass($link, 
"", 
'', 
true, 
false);
   358             $ilCtrl->setParameterByClass(
"ilformpropertydispatchgui", 
"postvar", $this->requested_postvar);
   360             $no_disp_class = (strpos($this->
getValue(), 
"|"))
   364             $itpl->setVariable(
"VAL_ID", $this->
getPostVar());
   365             $itpl->setVariable(
"URL_EDIT", $link);
   366             $itpl->setVariable(
"TXT_EDIT", 
$lng->
txt(
"form_get_link"));
   367             $itpl->setVariable(
"CSS_REMOVE", $no_disp_class);
   368             $itpl->setVariable(
"TXT_REMOVE", 
$lng->
txt(
"remove"));
   394                 $mode->addOption($no);
   398                 $mode->addOption($ext);
   401                 $mode->addOption($int);
   406                 $mode->setValue(
"int");
   408                 $mode->setValue(
"ext");
   416             $mode_type->addOption($mode_single);
   418             $mode_type->addOption($mode_list);
   422                 $mode->addOption($no);
   428             $mode->addOption($ext);
   429             $mode->addOption($int);
   430             $mode_single->addSubItem($mode);
   437             if ($has_int && self::isInternalLink($value)) {
   438                 $mode->setValue(
"int");
   440                 $value_trans = self::getTranslatedValue($value);
   442                 $value = explode(
"|", $value);
   443                 $hidden_type->setValue($value[0]);
   444                 $hidden_id->setValue($value[1]);
   445                 $hidden_target->setValue($value[2] ?? 
"");
   447                 $itpl->setVariable(
"VAL_OBJECT_TYPE", $value_trans[
"type"]);
   448                 $itpl->setVariable(
"VAL_OBJECT_NAME", $value_trans[
"name"]);
   449                 if (($value[2] ?? 
"") != 
"") {
   450                     $itpl->setVariable(
"VAL_TARGET_FRAME", 
"(" . $value[2] . 
")");
   452             } elseif ($has_ext) {
   453                 $mode->setValue(
"ext");
   455                 $ti->setValue($value);
   458             $mode->setValue(
"no");
   462         if ($has_ext && !$ti->getValue()) {
   463             $ti->setValue(
"https://");
   467             $ne->setValue($itpl->get());
   472             $html = $mode->render();
   474             $html = $mode->getToolbarHTML();
   477                 $html .= $ti->getToolbarHTML();
   478             } elseif ($has_int) {
   479                 $html .= $ne->render() .
   480                     '<div class="help-block">' . $ne->getInfo() . 
'</div>';
   484             $html = $mode_type->render();
   489             $html .= $hidden_type->getToolbarHTML() .
   490                 $hidden_id->getToolbarHTML() .
   491                 $hidden_target->getToolbarHTML();
   510         if (strpos($a_value, 
"|")) {
   511             $parts = explode(
"|", $a_value);
   514                 if (is_numeric(
$parts[1])) {
   516                     if (preg_match(
"/^[a-zA-Z_]+$/", 
$parts[0])) {
   529         $lng = $DIC->language();
   531         $value = explode(
"|", $a_value);
   532         if ($value === 
false || $value === []) {
   566         return array(
"type" => 
$type, 
"name" => $name);
   585         $val = explode(
"|", $this->
getInput());
   589         if (self::isInternalLink($this->
getInput())) {
   590             $target_frame = $val[2] ?? 
"";
   591             $map = self::getTypeToAttrType();
   592             if (isset($map[$val[0]])) {
   593                 $type = $map[$val[0]];
   594                 $target_type = $val[0];
   595                 if ($val[0] == 
"chap") {
   598                 if ($val[0] == 
"term") {
   599                     $target_type = 
"git";
   601                 if ($val[0] == 
"page") {
   604                 $target = 
"il__" . $target_type . 
"_" . $val[1];
   605             } elseif ($this->obj_definition->isRBACObject($val[0])) {
   606                 $type = 
"RepositoryItem";
   607                 $target = 
"il__obj_" . $val[1];
   613                     "TargetFrame" => $target_frame
   623         string $a_target_frame = 
""   625         $t = explode(
"_", $a_target);
   626         $target_id = ($t[3] ?? 
"");
   628         $map = self::getAttrTypeToType();
   629         if ($a_type == 
"RepositoryItem") {
   631         } elseif (isset($map[$a_type])) {
   632             $type = $map[$a_type];
   634         if (
$type != 
"" && $target_id != 
"") {
   635             $val = 
$type . 
"|" . $target_id;
   636             if ($a_target_frame != 
"") {
   637                 $val .= 
"|" . $a_target_frame;
 parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getInitHTML(string $a_url)
Get initialisation HTML to use internal link editing. 
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
 
static lookupTitle(int $a_page_id, string $lang="-")
 
static getOnloadCode(string $a_url)
 
loadLanguageModule(string $a_module)
Load language module. 
 
static _lookupObjId(int $ref_id)
 
static _lookupTitle(int $a_obj_id)
 
setVariable($variable, $value='')
Sets a variable value. 
 
static _lookupTitle(int $obj_id)
 
static _lookGlossaryTerm(int $term_id)
get glossary term 
 
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
__construct(Container $dic, ilPlugin $plugin)
 
static _lookupType(int $id, bool $reference=false)