40 $this->
access = $DIC->access();
41 $this->obj_definition =
$DIC[
"objDefinition"];
44 $this->
setId(self::TABLE_BASE_ID);
47 $this->
lng->loadLanguageModule(
'rep');
53 public function init(): void
56 $this->
lng->txt(
'rep_trash_table_title') .
' "' .
63 $this->
addColumn($this->
lng->txt(
'rep_trash_table_col_deleted_by'),
'deleted_by');
64 $this->
addColumn($this->
lng->txt(
'rep_trash_table_col_deleted_on'),
'deleted');
65 $this->
addColumn($this->
lng->txt(
'rep_trash_table_col_num_subs'),
'');
80 'tpl.trash_list_row.html',
81 'components/ILIAS/Repository/Trash'
86 $this->
addMultiCommand(
'restoreToNewLocation', $this->
lng->txt(
'btn_undelete_new_location'));
87 $this->
addMultiCommand(
'confirmRemoveFromSystem', $this->
lng->txt(
'btn_remove_system'));
99 $this->
lng->txt(
'type')
102 if ($type->getValue() !=
'') {
103 $this->current_filter[
'type'] = $type->getValue();
110 $this->
lng->txt(
'title')
112 if (
$title->getValue() !=
'') {
113 $this->current_filter[
'title'] =
$title->getValue();
119 $this->
lng->txt(
'rep_trash_table_col_deleted_by')
121 $this->current_filter[
'deleted_by'] = $deleted_by->getValue();
127 $this->
lng->txt(
'rep_trash_table_col_deleted_on')
129 $this->current_filter[
'deleted'] = $deleted->getValue();
136 $max_trash_entries = 0;
139 $items = $trash_tree_reader->getTrashNodeForContainer(
141 $this->current_filter,
152 foreach ($items as $item) {
153 $row[
'id'] = $item->getRefId();
154 $row[
'obj_id'] = $item->getObjId();
155 $row[
'type'] = $item->getType();
158 $row[
'deleted_by_id'] = $item->getDeletedBy();
159 $row[
'deleted_by'] = $this->
lng->txt(
'rep_trash_deleted_by_unknown');
161 $row[
'deleted_by'] = $login;
163 $row[
'deleted'] = $item->getDeleted();
164 $row[
'num_subs'] = $trash_tree_reader->getNumberOfTrashedNodesForTrashedContainer($item->getRefId());
173 protected function fillRow(array $a_set): void
175 $this->tpl->setVariable(
'ID', $a_set[
'id']);
176 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'title']);
177 if (trim($a_set[
'description']) !==
'') {
178 $this->tpl->setCurrentBlock(
'with_desc');
179 $this->tpl->setVariable(
'VAL_DESC', $a_set[
'description']);
180 $this->tpl->parseCurrentBlock();
183 $this->tpl->setCurrentBlock(
'with_path');
185 $path->enableTextOnly(
false);
186 $this->tpl->setVariable(
'PATH',
$path->getPath($this->ref_id, $a_set[
'id']));
187 $this->tpl->parseCurrentBlock();
190 (
int) $a_set[
'obj_id'],
195 $alt = ($this->obj_definition->isPlugin($a_set[
'type']))
197 : $this->
lng->txt(
'icon') .
' ' . $this->
lng->txt(
'obj_' . $a_set[
'type'])
199 $this->tpl->setVariable(
'IMG_PATH', $img);
200 $this->tpl->setVariable(
'IMG_ALT', $alt);
203 $this->tpl->setVariable(
'VAL_DELETED_BY', $a_set[
'deleted_by']);
207 $this->tpl->setVariable(
'VAL_SUBS', (
string) (
int) $a_set[
'num_subs']);
213 $subs = $trash->getTrashedNodeTypesForContainer($this->ref_id);
217 foreach ($subs as $type) {
218 if ($type ===
'rolf') {
221 if ($type ===
'root') {
225 if (!$this->obj_definition->isRBACObject($type)) {
228 if ($this->obj_definition->isPlugin($type)) {
229 $this->
lng->loadLanguageModule(
'rep_robj_' . $type);
230 $options[$type] = $this->
lng->txt(
'rep_robj_' . $type .
'_objs_' . $type);
232 $options[$type] = $this->
lng->txt(
'objs_' . $type);
235 asort(
$options, SORT_LOCALE_STRING);
236 array_unshift(
$options, $this->
lng->txt(
'select_one'));
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
static _lookupLogin(int $a_user_id)
parses the objects.xml it handles the xml-description of all ilias objects
static lookupTxtById(string $plugin_id, string $lang_var)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
determineOffsetAndOrder(bool $a_omit_offset=false)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setEnableNumInfo(bool $a_val)
setExternalSegmentation(bool $a_val)
setEnableTitle(bool $a_enabletitle)
addMultiCommand(string $a_cmd, string $a_text)
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setEnableHeader(bool $a_enableheader)
setDefaultOrderField(string $a_defaultorderfield)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setDefaultFilterVisiblity(bool $a_status)
setData(array $a_data)
Set table data.
enable(string $a_module_name)
setMaxCount(int $a_max_count)
set max.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(object $a_parent_obj, string $a_parent_cmd, int $ref_id)
fillRow(array $a_set)
Standard Version of Fill Row.
ilObjectDefinition $obj_definition
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc