29 $this->
setId(
'usages');
33 $this->
setRowTemplate(
'tpl.lti_consume_provider_usage_table_row.html',
'Modules/LTIConsumer');
35 $this->
setTitle($DIC->language()->txt(
'tbl_provider_usage_header'));
36 $this->
setDescription($DIC->language()->txt(
'tbl_provider_usage_header_info'));
47 parent::determineSelectedColumns();
55 $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_icon'),
'icon');
56 $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_title'),
'title');
57 $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_usages_trashed'),
'usedByIsTrashed');
58 $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_used_by'),
'used_by');
65 $this->tpl->setVariable(
'TITLE',
$data[
'title']);
68 $this->tpl->setCurrentBlock(
'usages_trashed');
69 $usagesTrashed =
$data[
'usedByIsTrashed'] && $this->
isTrashEnabled() ? $DIC->language()->txt(
'yes') :
'';
70 $this->tpl->setVariable(
'USAGES_TRASHED', $usagesTrashed);
71 $this->tpl->parseCurrentBlock();
74 $this->tpl->setCurrentBlock(
'used_by');
76 $this->tpl->setVariable(
'TREE_TO_USED_BY', $tree[
'tree']);
77 $this->tpl->parseCurrentBlock();
81 $this->tpl->setVariable(
'ICON_SRC', $data[
'icon']);
82 $this->tpl->setVariable(
'ICON_ALT', basename($data[
'icon']));
85 $this->tpl->setVariable(
'ICON_SRC',
$icon);
86 $this->tpl->setVariable(
'ICON_ALT',
'lti');
94 $tree = $DIC->repositoryTree()->getPathFull($refId);
96 foreach ($tree as $node) {
97 $node[
'title'] = (int) $node[
'parent'] === 0 ? $DIC->language()->txt(
'repository') : $node[
'title'];
98 $treeNodes[] = $trashed ===
true ? $node[
'title'] :
'<a href="' .
ilLink::_getLink($node[
'ref_id']) .
'">' . $node[
'title'] .
'</a>';
101 if ($trashed ===
true) {
105 return [
'endnode' => $endnode,
'tree' => implode(
' > ', $treeNodes)];
111 return (
bool) $DIC->settings()->get(
'enable_trash', 0);
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
__construct(ilLTIConsumerAdministrationGUI $a_parent_obj, $a_parent_cmd)
ilLTIConsumerProviderUsageTableGUI constructor.
setDescription($a_val)
Set description.
buildLinkToUsedBy(int $objId, int $refId, string $title, $trashed)
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
__construct(Container $dic, ilPlugin $plugin)
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.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")