32    public function __construct($a_parent_obj, $a_parent_cmd = 
'')
 
   36        $this->db = 
$DIC->database();
 
   37        $this->copyright_id = $a_parent_obj->getEntryId();
 
   38        $this->lng = 
$DIC->language();
 
   39        $this->lng->loadLanguageModule(
'meta');
 
   41        $this->
setId(
"mdcopusage" . $this->copyright_id);
 
   52        $this->
setTitle($md_entry->getTitle());
 
   54        $this->
addColumn($this->lng->txt(
'object'), 
'object');
 
   55        $this->
addColumn($this->lng->txt(
'meta_references'), 
'references');
 
   56        $this->
addColumn($this->lng->txt(
'meta_copyright_sub_items'), 
'subitems');
 
   57        $this->
addColumn($this->lng->txt(
'owner'), 
'owner');
 
   59        $this->
setRowTemplate(
"tpl.show_copyright_usages_row.html", 
"Services/MetaData");
 
   61            $this->getParentObject(),
 
   87            $this->lng->txt(
"object") . 
" " . $this->lng->txt(
"title")
 
   92        $this->objects = array();
 
   94            $this->objects[$item] = $this->lng->txt(
"obj_" . $item);
 
   97        $item->setOptions(array(
"" => 
"-") + $this->objects);
 
   98        $this->
filter[
"object"] = $item->getValue();
 
  108        if ($this->
filter[
"title"]) {
 
  112        if ($this->
filter[
'object']) {
 
  122        $f = 
$DIC->ui()->factory();
 
  123        $r = 
$DIC->ui()->renderer();
 
  125        $icon = 
$f->symbol()->icon()->standard($a_set[
'type'], $this->lng->txt($a_set[
'type']), 
"medium");
 
  126        $this->tpl->setVariable(
'OBJ_TYPE_ICON', $r->render(
$icon));
 
  127        $this->tpl->setVariable(
'TITLE', $a_set[
'title']);
 
  128        $this->tpl->setVariable(
"DESCRIPTION", $a_set[
'desc']);
 
  129        if ($a_set[
'references']) {
 
  131            $path->enableHideLeaf(
false);
 
  132            $path->enableDisplayCut(
true);
 
  133            $path->enableTextOnly(
false);
 
  135            foreach ($a_set[
'references'] as $reference) {
 
  136                $this->tpl->setCurrentBlock(
"references");
 
  137                $this->tpl->setVariable(
"REFERENCE", $path->getPath(
ROOT_FOLDER_ID, $reference));
 
  138                $this->tpl->parseCurrentBlock();
 
  142        $this->tpl->setVariable(
'SUB_ITEMS', $a_set[
'sub_items']);
 
  145        if ($a_set[
'owner_link']) {
 
  146            $this->tpl->setCurrentBlock(
"link_owner");
 
  147            $this->tpl->setVariable(
"OWNER_LINK", $a_set[
'owner_link']);
 
  148            $this->tpl->setVariable(
'OWNER', $a_set[
'owner_name']);
 
  149            $this->tpl->parseCurrentBlock();
 
  151            $this->tpl->setCurrentBlock(
"owner");
 
  152            $this->tpl->setVariable(
'OWNER', $a_set[
'owner_name']);
 
  153            $this->tpl->parseCurrentBlock();
 
  166        foreach ($db_data as $item) {
 
  167            $obj_id = $item[
'obj_id'];
 
  195        $query = 
"SELECT DISTINCT obj_type FROM il_meta_rights " .
 
  196            "WHERE description = " . $this->db->quote(
'il_copyright_entry__' . 
IL_INST_ID . 
'__' . $this->copyright_id, 
'text') .
 
  197            " AND rbac_id = obj_id";
 
  200        while ($row = $this->db->fetchAssoc(
$result)) {
 
  201            array_push(
$data, $row[
'obj_type']);
 
  211        $query = 
"SELECT rbac_id, obj_id, obj_type FROM il_meta_rights " .
 
  212            "WHERE description = " . $this->db->quote(
'il_copyright_entry__' . 
IL_INST_ID . 
'__' . $this->copyright_id, 
'text') .
 
  213            ' AND rbac_id != ' . $this->db->quote(0, 
'integer') .
 
  218        while ($row = $this->db->fetchAssoc(
$result)) {
 
  220                "obj_id" => $row[
'rbac_id'],
 
  221                "obj_type" => $row[
'obj_type']
 
  229        $query = 
"SELECT count(rbac_id) total FROM il_meta_rights " .
 
  230            "WHERE rbac_id = " . $this->db->quote($a_rbac_id) .
 
  231            " AND rbac_id <> obj_id";
 
  234        $row = $this->db->fetchAssoc(
$result);
 
  236        return $row[
'total'];
 
An exception for terminatinating execution or to throw for unit testing.
parse()
Parse table content.
getCurrentFilter()
Get current filter settings.
init()
init table columns, ...
fillRow($a_set)
Standard Version of Fill Row.
collectData(array $filters)
getCountSubItemsFromDB($a_rbac_id)
__construct($a_parent_obj, $a_parent_cmd='')
ilCopyrightUsageGUI constructor.
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
static _getAllReferences($a_id)
get all reference ids of object
static _lookupOwner($a_id)
lookup object owner
static _lookupType($a_id, $a_reference=false)
lookup object type
Creates a path for a start and endnode.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static getProfileLink($a_usr_id)
Get link to personal profile Return empty string in case of not public profile.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc