30         string $a_source_type,
    36         $ilDB = $DIC->database();
    40             $lang_where = 
" AND source_lang = " . 
$ilDB->quote($a_lang, 
"text");
    43         $q = 
"DELETE FROM int_link WHERE source_type = " .
    44             $ilDB->quote($a_source_type, 
"text") . 
" AND source_id=" .
    45             $ilDB->quote($a_source_id, 
"integer") .
    54         string $a_target_type,
    56         int $a_target_inst = 0
    60         $ilDB = $DIC->database();
    63             "DELETE FROM int_link WHERE target_type = %s " .
    64             " AND target_id = %s AND target_inst = %s ",
    65             array(
"text", 
"integer", 
"integer"),
    66             array($a_target_type, $a_target_id, $a_target_inst)
    74         string $a_source_type,
    76         string $a_target_type,
    78         int $a_target_inst = 0,
    79         string $a_source_lang = 
"-"    83         $ilDB = $DIC->database();
    88                 "source_type" => array(
"text", $a_source_type),
    89                 "source_id" => array(
"integer", $a_source_id),
    90                 "source_lang" => array(
"text", $a_source_lang),
    91                 "target_type" => array(
"text", $a_target_type),
    92                 "target_id" => array(
"integer", $a_target_id),
    93                 "target_inst" => array(
"integer", $a_target_inst)
   107         string $a_target_type,
   113         $ilDB = $DIC->database();
   115         $q = 
"SELECT * FROM int_link WHERE " .
   116             "target_type = " . 
$ilDB->quote($a_target_type, 
"text") . 
" AND " .
   117             "target_id = " . 
$ilDB->quote($a_target_id, 
"integer") . 
" AND " .
   118             "target_inst = " . 
$ilDB->quote($a_target_inst, 
"integer");
   119         $source_set = 
$ilDB->query(
$q);
   121         while ($source_rec = 
$ilDB->fetchAssoc($source_set)) {
   122             $sources[$source_rec[
"source_type"] . 
":" . $source_rec[
"source_id"] . 
":" . $source_rec[
"source_lang"]] =
   123                 array(
"type" => $source_rec[
"source_type"], 
"id" => $source_rec[
"source_id"],
   124                     "lang" => $source_rec[
"source_lang"]);
   138         string $a_source_type,
   140         string $a_source_lang = 
"-"   144         $ilDB = $DIC->database();
   147         if ($a_source_lang !== 
"") {
   148             $lang_where = 
" AND source_lang = " . 
$ilDB->quote($a_source_lang, 
"text");
   151         $q = 
"SELECT * FROM int_link WHERE " .
   152             "source_type = " . 
$ilDB->quote($a_source_type, 
"text") . 
" AND " .
   153             "source_id = " . 
$ilDB->quote($a_source_id, 
"integer") .
   156         $target_set = 
$ilDB->query(
$q);
   158         while ($target_rec = 
$ilDB->fetchAssoc($target_set)) {
   159             $targets[$target_rec[
"target_type"] . 
":" . $target_rec[
"target_id"] . 
":" . $target_rec[
"target_inst"]] =
   160                 array(
"type" => $target_rec[
"target_type"], 
"id" => $target_rec[
"target_id"],
   161                 "inst" => $target_rec[
"target_inst"]);
   182                     return "il__pg_" . 
$id;
   186             case "StructureObject":
   189                     return "il__st_" . 
$id;
   197                     return "il__git_" . 
$id;
   214                     return "il__mob_" . 
$id;
   218             case "RepositoryItem":
   220                 $tarr = explode(
"_", $a_target);
   221                 $import_id = $a_target;
   226                 if (($tarr[4] ?? 
"") != 
"") {
   227                     $import_id = $tarr[0] . 
"_" . $tarr[1] . 
"_" . $tarr[2] . 
"_" . $tarr[3];
   236                     foreach ($refs as $ref) {
   237                         return "il__obj_" . $ref;
   244                 if (self::_extractInstOfTarget($a_target) == 
IL_INST_ID   247                     if (($tarr[4] ?? 
"") != 
"") {
   248                         return "il__obj_" . $tarr[4];
   270         $tree = $DIC->repositoryTree();
   274             case "StructureObject":
   286             case "RepositoryItem":
   287                 if (is_int(strpos($a_target, 
"_"))) {
   288                     $ref_id = self::_extractObjIdOfTarget($a_target);
   289                     return $tree->isInTree(
$ref_id);
   303         if (!is_int(strpos($a_target, 
"__"))) {
   304             $target = explode(
"_", $a_target);
   305             if (isset($target[1]) && $target[1] > 0) {
   306                 return (
int) $target[1];
   318         if (!is_int(strpos($a_target, 
"__"))) {
   319             $target = explode(
"_", $a_target);
   320             if ($target[1] > 0) {
   321                 return "il__" . $target[2] . 
"_" . $target[3];
   333         $target = explode(
"_", $a_target);
   334         return (
int) $target[count($target) - 1];
   343         $target = explode(
"_", $a_target);
   344         return (
string) ($target[count($target) - 2] ?? 
"");
   356         $query_parser->setMinWordLength(3);
   357         $query_parser->parse();
   360         $user_search->enableActiveCheck(
true);
   361         $user_search->setFields(array(
'login'));
   362         $result_obj = $user_search->performSearch();
   363         $result->mergeEntries($result_obj);
   365         $user_search->setFields(array(
'firstname'));
   366         $result_obj = $user_search->performSearch();
   367         $result->mergeEntries($result_obj);
   369         $user_search->setFields(array(
'lastname'));
   370         $result_obj = $user_search->performSearch();
   371         $result->mergeEntries($result_obj);
   373         $result->setMaxHits(100000);
   374         $result->preventOverwritingMaxhits(
true);
   382         $users = array_intersect($users, $p[
"public"]);
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _getTargetsOfSource(string $a_source_type, int $a_source_id, string $a_source_lang="-")
Get all targets of a source object (e.g., a page) 
 
static _getSourcesOfTarget(string $a_target_type, int $a_target_id, int $a_target_inst)
get all sources of a link target 
 
static _removeInstFromTarget(string $a_target)
Removes installation id from target string. 
 
static _extractObjIdOfTarget(string $a_target)
Extract object id out of target. 
 
static getProfileStatusOfUsers(array $a_user_ids)
Get profile status. 
 
static _exists(int $a_id)
checks whether a glossary term with specified id exists or not 
 
static _getIdForImportId(string $a_import_id)
 
static _getAllReferences(int $id)
get all reference ids for object ID 
 
static _getUserSearchInstance(ilQueryParser $query_parser)
 
static _getIdForImportId(string $import_id)
 
static _saveLink(string $a_source_type, int $a_source_id, string $a_target_type, int $a_target_id, int $a_target_inst=0, string $a_source_lang="-")
save internal link information 
 
static _extractInstOfTarget(string $a_target)
Extract installation id out of target. 
 
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists. 
 
static _deleteAllLinksOfSource(string $a_source_type, int $a_source_id, string $a_lang="-")
Delete all links of a given source. 
 
static _getIdForImportId(string $a_import_id)
get current object id for import id (static) 
 
static _getIdForImportId(string $a_type, string $a_target)
Get current id for an import id. 
 
static _deleteAllLinksToTarget(string $a_target_type, int $a_target_id, int $a_target_inst=0)
Delete all links to a given target. 
 
static searchUsers(string $a_search_str)
Search users. 
 
static _exists(int $a_id)
checks wether a lm content object with specified id exists or not 
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
static _extractTypeOfTarget(string $a_target)
Extract type out of target. 
 
static _exists(string $a_type, string $a_target)
Check if internal link refers to a valid target.