19 declare(strict_types=1);
    45         $this->copyright_id = $a_parent_obj->
getEntryId();
    47         $this->
setId(
"mdcopusage" . $this->copyright_id);
    51         $this->ui_factory = $DIC->ui()->factory();
    52         $this->ui_renderer = $DIC->ui()->renderer();
    53         $this->db = $DIC->database();
    54         $this->
lng = $DIC->language();
    55         $this->
lng->loadLanguageModule(
'meta');
    58     public function init(): void
    60         $this->
setTitle($this->copyright_title);
    64         $this->
addColumn($this->
lng->txt(
'meta_copyright_sub_items'), 
'sub_items');
    65         $this->
addColumn($this->
lng->txt(
'owner'), 
'owner_name');
    67         $this->
setRowTemplate(
"tpl.show_copyright_usages_row.html", 
"components/ILIAS/MetaData");
    69             $this->getParentObject(),
    89             $this->
lng->txt(
"object") . 
" " . $this->
lng->txt(
"title")
    94         $this->objects = array();
    96             $this->objects[$item] = $this->
lng->txt(
"obj_" . $item);
    99         $item->setOptions(array(
"" => 
"-") + $this->objects);
   100         $this->filter[
"object"] = $item->getValue();
   105         if ($a_field === 
'sub_items') {
   117         if ($this->
filter[
"title"]) {
   118             $filter[
"title"] = $this->
filter[
"title"];
   121         if ($this->
filter[
'object']) {
   122             $filter[
'object'] = $this->
filter[
'object'];
   127     protected function fillRow(array $a_set): void
   129         $icon = $this->ui_factory->symbol()->icon()->standard(
   131             $this->
lng->txt($a_set[
'type']),
   134         $this->tpl->setVariable(
'OBJ_TYPE_ICON', $this->ui_renderer->render(
$icon));
   135         $this->tpl->setVariable(
'TITLE', $a_set[
'title']);
   136         $this->tpl->setVariable(
"DESCRIPTION", $a_set[
'desc']);
   137         if ($a_set[
'references']) {
   139             $path->enableHideLeaf(
false);
   140             $path->enableDisplayCut(
true);
   141             $path->enableTextOnly(
false);
   143             foreach ($a_set[
'references'] as $reference) {
   144                 $this->tpl->setCurrentBlock(
"references");
   146                 $this->tpl->parseCurrentBlock();
   150         $this->tpl->setVariable(
'SUB_ITEMS', $a_set[
'sub_items']);
   153         if ($a_set[
'owner_link']) {
   154             $this->tpl->setCurrentBlock(
"link_owner");
   155             $this->tpl->setVariable(
"OWNER_LINK", $a_set[
'owner_link']);
   156             $this->tpl->setVariable(
'OWNER', $a_set[
'owner_name']);
   157             $this->tpl->parseCurrentBlock();
   159             $this->tpl->setCurrentBlock(
"owner");
   160             $this->tpl->setVariable(
'OWNER', $a_set[
'owner_name']);
   161             $this->tpl->parseCurrentBlock();
   175         foreach ($db_data as $item) {
   176             $obj_id = $item[
'obj_id'];
   178                 ($filters[
'title'] ?? 
false) &&
   184                 ($filters[
'object'] ?? 
false) &&
   209         $query = 
"SELECT DISTINCT obj_type FROM il_meta_rights " .
   210             "WHERE description = " . $this->db->quote(
   211                 'il_copyright_entry__' . 
IL_INST_ID . 
'__' . $this->copyright_id,
   214             " AND rbac_id = obj_id";
   215         $result = $this->db->query($query);
   217         while ($row = $this->db->fetchAssoc($result)) {
   218             $data[] = $row[
'obj_type'];
   228         $query = 
"SELECT rbac_id, obj_id, obj_type FROM il_meta_rights " .
   229             "WHERE description = " . $this->db->quote(
   230                 'il_copyright_entry__' . 
IL_INST_ID . 
'__' . $this->copyright_id,
   233             ' AND rbac_id != ' . $this->db->quote(0, 
'integer') .
   236         $result = $this->db->query($query);
   238         while ($row = $this->db->fetchAssoc($result)) {
   240                 "obj_id" => (
int) $row[
'rbac_id'],
   241                 "obj_type" => (
string) $row[
'obj_type']
   249         $query = 
"SELECT count(rbac_id) total FROM il_meta_rights " .
   251             " AND rbac_id != obj_id";
   253         $result = $this->db->query($query);
   255             return (
int) $row->total;
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
collectData(array $filters)
 
static _getAllReferences(int $id)
get all reference ids for object ID 
 
numericOrdering(string $a_field)
 
setDisableFilterHiding(bool $a_val=true)
 
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID. 
 
static getProfileLink(int $a_usr_id)
Get link to personal profile Return empty string in case of not public profile. 
 
getCountSubItemsFromDB(int $a_rbac_id)
 
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type. 
 
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is: 
 
static _lookupTitle(int $obj_id)
 
This is how the factory for UI elements looks. 
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
__construct(ilMDCopyrightUsageGUI $a_parent_obj, string $a_parent_cmd='')
 
static _lookupDescription(int $obj_id)
 
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)
 
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
 
static _lookupType(int $id, bool $reference=false)