35         bool $a_include_hist = 
false    39         $this->
ctrl = $DIC->ctrl();
    40         $this->
lng = $DIC->language();
    41         $this->
access = $DIC->access();
    42         $ilCtrl = $DIC->ctrl();
    43         $lng = $DIC->language();
    45         $this->repo_tree = $DIC->repositoryTree();
    48         $this->media_object = $a_media_object;
    49         $this->include_hist = $a_include_hist;
    54         $this->
setRowTemplate(
"tpl.mob_usage_row.html", 
"components/ILIAS/MediaObjects");
    64         $usages = $this->media_object->getUsages($this->include_hist);
    68         $agg_usages = array();
    69         foreach ($usages as $k => $usage) {
    70             $usage[
"trash"] = 
false;
    71             if (is_int(strpos($usage[
"type"], 
":"))) {
    72                 $us_arr = explode(
":", $usage[
"type"]);
    75                 if ($us_arr[1] == 
"pg") {
    77                     $usage[
"page"] = $page_obj;
    79                     $ref_ids = array_filter(
    81                         function (
$ref_id) use ($repo_tree) {
    85                     $usage[
"ref_ids"] = $ref_ids;
    86                     if (count($ref_ids) == 0) {
    87                         $usage[
"trash"] = 
true;
    93             if ($usage[
"type"] == 
"clip") {
    96                 if ($this->include_hist || !$usage[
"trash"]) {
    97                     if (empty($agg_usages[$usage[
"type"] . 
":" . $usage[
"id"]])) {
    98                         $agg_usages[$usage[
"type"] . 
":" . $usage[
"id"]] = $usage;
   100                     $agg_usages[$usage[
"type"] . 
":" . $usage[
"id"]][
"versions"][] =
   101                         [
"hist_nr" => $usage[
"hist_nr"] ?? 0,
   102                          "lang" => $usage[
"lang"] ?? 
""];
   109             $agg_usages[] = array(
"type" => 
"clip", 
"cnt" => $clip_cnt);
   114     protected function fillRow(array $a_set): void
   121         if (is_int(strpos($usage[
"type"], 
":"))) {
   122             $us_arr = explode(
":", $usage[
"type"]);
   123             $usage[
"type"] = $us_arr[1];
   124             $cont_type = $us_arr[0];
   127         switch ($usage[
"type"]) {
   129                 $page_obj = $usage[
"page"];
   134                 switch ($cont_type) {
   138                             $item[
"obj_type_txt"] = $this->
lng->txt(
"obj_" . $cont_type);
   139                             $item[
"obj_title"] = $lm_obj->
getTitle();
   140                             $item[
"sub_txt"] = $this->
lng->txt(
"pg");
   150                         $item[
"obj_type_txt"] = $this->
lng->txt(
"obj_wiki");
   152                         $item[
"sub_txt"] = $this->
lng->txt(
"pg");
   161                         $term_id = $page_obj->getId();
   163                         $item[
"obj_type_txt"] = $this->
lng->txt(
"obj_glo");
   165                         $item[
"sub_txt"] = $this->
lng->txt(
"cont_term");
   175                         $item[
"obj_type_txt"] = $this->
lng->txt(
"obj_" . $otype);
   184                         $item[
"obj_type_txt"] = $this->
lng->txt(
"mep_page_type_mep");
   185                         $item[
"sub_txt"] = $this->
lng->txt(
"mep_page_type_mep");
   189                         foreach ($mep_pools as $mep_id) {
   192                             foreach ($ref_ids as $rid) {
   204                             $item[
"obj_type_txt"] = $this->
lng->txt(
"obj_" . $type);
   214                 if ($usage[
"trash"]) {
   215                     $item[
"obj_title"] .= 
" (" . 
$lng->
txt(
"trash") . 
")";
   221                 $item[
"obj_type_txt"] = $this->
lng->txt(
"obj_mep");
   230                 $item[
"obj_type_txt"] = $this->
lng->txt(
"obj_mob");
   232                 $item[
"sub_txt"] = $this->
lng->txt(
"cont_link_area");
   238                 $item[
"obj_type_txt"] = $this->
lng->txt(
"obj_" . $obj_type);
   240                 $item[
"sub_txt"] = $this->
lng->txt(
"news");
   249         if (is_array($usage[
"versions"]) && is_object($usage[
"page"] ?? null)) {
   252             if (count($usage[
"versions"]) > 5) {
   254                 $cnt = count($usage[
"versions"]) - 5;
   255                 for ($i = 0; $i < $cnt; $i++) {
   256                     unset($usage[
"versions"][$i]);
   259             foreach ($usage[
"versions"] as 
$version) {
   260                 if ($version[
"hist_nr"] == 0) {
   261                     $version[
"hist_nr"] = $this->
lng->txt(
"cont_current_version");
   263                 $ver .= $sep . $version[
"hist_nr"];
   264                 if ($version[
"lang"] != 
"") {
   265                     $ver .= 
"/" . $version[
"lang"];
   270             $this->tpl->setCurrentBlock(
"versions");
   271             $this->tpl->setVariable(
"VAL_VERSIONS", $ver);
   273             $this->tpl->setCurrentBlock(
"versions");
   274             $this->tpl->setVariable(
"VAL_VERSIONS", 
" ");
   276         $this->tpl->parseCurrentBlock();
   278         if (($item[
"obj_type_txt"] ?? 
"") != 
"") {
   279             $this->tpl->setVariable(
"VAL_TYPE", $item[
"obj_type_txt"]);
   282         if (($usage[
"type"] ?? 
"") != 
"clip") {
   283             if ($item[
"obj_link"] ?? 
false) {
   284                 $this->tpl->setCurrentBlock(
"linked_item");
   285                 $this->tpl->setVariable(
"TXT_OBJECT", $item[
"obj_title"]);
   286                 $this->tpl->setVariable(
"HREF_LINK", $item[
"obj_link"]);
   287                 $this->tpl->parseCurrentBlock();
   289                 $this->tpl->setVariable(
"TXT_OBJECT_NO_LINK", $item[
"obj_title"]);
   292             if (($item[
"sub_txt"] ?? 
"") != 
"") {
   293                 $this->tpl->setVariable(
"SEP", 
", ");
   294                 $this->tpl->setVariable(
"SUB_TXT", $item[
"sub_txt"]);
   295                 if (($item[
"sub_title"] ?? 
"") != 
"") {
   296                     $this->tpl->setVariable(
"SEP2", 
": ");
   297                     $this->tpl->setVariable(
"SUB_TITLE", $item[
"sub_title"]);
   301             $this->tpl->setVariable(
"TXT_OBJECT_NO_LINK", $this->
lng->txt(
"cont_users_have_mob_in_clip1") .
   302                 " " . $usage[
"cnt"] . 
" " . $this->
lng->txt(
"cont_users_have_mob_in_clip2"));
   312         foreach ($ref_ids as 
$ref_id) {
   313             if ($ilAccess->checkAccess(
"write", 
"", $ref_id)) {
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
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...
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
static _getAllReferences(int $id)
get all reference ids for object ID 
 
static lookupTitle(int $a_page_id, string $lang="-")
 
isInTree(?int $a_node_id)
get all information of a node. 
 
static _lookupTitle(int $a_obj_id)
 
static _lookupTitle(int $obj_id)
 
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
static _lookGlossaryTerm(int $term_id)
get glossary term 
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
__construct(Container $dic, ilPlugin $plugin)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
static _lookupType(int $id, bool $reference=false)
 
static _lookupContextObjId(int $a_news_id)
Context Object ID. 
 
static getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
Get page object instance. 
 
static _lookGlossaryID(int $term_id)
get glossary id form term id