ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDclRecordListGUI Class Reference
+ Collaboration diagram for ilDclRecordListGUI:

Public Member Functions

 __construct (ilObjDataCollectionGUI $a_parent_obj, int $table_id, int $tableview_id)
 
 getRefId ()
 
 getObjId ()
 
 executeCommand ()
 execute command More...
 
 listRecords (bool $use_tableview_filter=false)
 
 showImportExcel (?ilPropertyFormGUI $form=null)
 
 initImportForm ()
 Init form. More...
 
 importExcel ()
 Import Data from Excel sheet. More...
 
 endImport (int $i, array $warnings)
 End import. More...
 
 sendFile ()
 send File to User More...
 
 getTableId ()
 
 getTableviewId ()
 

Data Fields

const GET_TABLE_ID = 'table_id'
 
const GET_TABLEVIEW_ID = 'tableview_id'
 
const GET_MODE = "mode"
 
const MODE_VIEW = "view"
 
const MODE_MANAGE = "manage"
 
const CMD_LIST_RECORDS = 'listRecords'
 
const CMD_SHOW = 'show'
 
const CMD_CONFIRM_DELETE_RECORDS = 'confirmDeleteRecords'
 
const CMD_CANCEL_DELETE = 'cancelDelete'
 
const CMD_DELETE_RECORDS = 'deleteRecords'
 
const CMD_SHOW_IMPORT_EXCEL = 'showImportExcel'
 

Protected Member Functions

 applyFilter ()
 
 resetFilter ()
 
 setSubTabs (string $active_mode=self::GET_MODE)
 
 getRecordListTableGUI (bool $use_tableview_filter)
 
 createSwitchers ()
 
 checkAccess ()
 

Protected Attributes

ILIAS UI Factory $ui_factory
 
ILIAS UI Renderer $renderer
 
string $mode = self::MODE_VIEW
 Stores current mode active. More...
 
ilDclTable $table_obj
 
int $table_id
 
int $obj_id
 
ilObjDataCollectionGUI $parent_obj
 
int $tableview_id
 
ilCtrl $ctrl
 
ilToolbarGUI $toolbar
 
ilLanguage $lng
 
ilTabsGUI $tabs
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ILIAS ResourceStorage Services $irss
 
bool $filter_changed = false
 

Static Protected Attributes

static array $available_modes = [self::MODE_VIEW, self::MODE_MANAGE]
 

Private Member Functions

 importRecords (string $file, bool $simulate=false)
 Import records from Excel file. More...
 
 recordBelongsToCollection (ilDclBaseRecordModel $record)
 

Private Attributes

ilAccessHandler $access
 
ilGlobalTemplateInterface $tpl
 

Detailed Description

Definition at line 21 of file class.ilDclRecordListGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilDclRecordListGUI::__construct ( ilObjDataCollectionGUI  $a_parent_obj,
int  $table_id,
int  $tableview_id 
)
Exceptions
ilCtrlException

Definition at line 63 of file class.ilDclRecordListGUI.php.

References $DIC, $mode, $table_id, $tableview_id, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilObjectGUI\getObject(), ilDclCache\getTableCache(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), renderer(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

64  {
65  global $DIC;
66 
67  $this->ctrl = $DIC->ctrl();
68  $this->toolbar = $DIC->toolbar();
69  $this->lng = $DIC->language();
70  $this->tabs = $DIC->tabs();
71  $this->http = $DIC->http();
72  $this->refinery = $DIC->refinery();
73  $this->irss = $DIC->resourceStorage();
74  $this->access = $DIC->access();
75  $this->tpl = $DIC->ui()->mainTemplate();
76  $this->ui_factory = $DIC->ui()->factory();
77  $this->renderer = $DIC->ui()->renderer();
78 
79  $this->table_id = $table_id;
80  $this->tableview_id = $tableview_id;
81 
82  $this->obj_id = $a_parent_obj->getObject()->getId();
83  $this->parent_obj = $a_parent_obj;
84  $this->table_obj = ilDclCache::getTableCache($table_id);
85 
86  $this->ctrl->setParameterByClass(ilDclRecordEditGUI::class, self::GET_TABLE_ID, $this->table_id);
87  $this->ctrl->setParameterByClass(ilDclRecordEditGUI::class, self::GET_TABLEVIEW_ID, $this->tableview_id);
88  $this->ctrl->setParameterByClass(ilDclDetailedViewGUI::class, self::GET_TABLEVIEW_ID, $this->tableview_id);
89 
90  $this->mode = self::MODE_VIEW;
91 
92  if ($this->http->wrapper()->query()->has(self::GET_MODE)) {
93  $mode = $this->http->wrapper()->query()->retrieve(self::GET_MODE, $this->refinery->kindlyTo()->string());
94  if (in_array($mode, self::$available_modes, true)) {
95  $this->mode = $mode;
96  }
97  }
98  }
renderer()
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
static getTableCache(?int $table_id=null)
string $mode
Stores current mode active.
+ Here is the call graph for this function:

Member Function Documentation

◆ applyFilter()

ilDclRecordListGUI::applyFilter ( )
protected
Exceptions
ilCtrlException

Definition at line 301 of file class.ilDclRecordListGUI.php.

References listRecords().

301  : void
302  {
303  $table = new ilDclRecordListTableGUI($this, "listRecords", $this->table_obj, $this->tableview_id);
304  $table->initFilter();
305  $table->resetOffset();
306  $table->writeFilterToSession();
307  $this->filter_changed = true;
308  $this->listRecords();
309  }
listRecords(bool $use_tableview_filter=false)
+ Here is the call graph for this function:

◆ checkAccess()

ilDclRecordListGUI::checkAccess ( )
protected

Definition at line 562 of file class.ilDclRecordListGUI.php.

References $table_id, $tableview_id, and null.

Referenced by executeCommand().

562  : bool
563  {
564  if (null === $this->table_id || null === $this->tableview_id) {
565  return false;
566  }
567 
568  return ilObjDataCollectionAccess::hasAccessTo(
569  $this->parent_obj->getRefId(),
572  );
573  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ createSwitchers()

ilDclRecordListGUI::createSwitchers ( )
protected

Definition at line 539 of file class.ilDclRecordListGUI.php.

References ILIAS\Repository\ctrl(), getTableId(), ilObjDataCollectionAccess\hasWriteAccess(), ILIAS\Repository\lng(), and ILIAS\Repository\toolbar().

Referenced by listRecords().

539  : void
540  {
541  if (ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->getRefId())) {
542  $tables = $this->parent_obj->object->getTables();
543  } else {
544  $tables = $this->parent_obj->object->getVisibleTables();
545  }
546 
547  $switcher = new ilDclSwitcher($this->toolbar, $this->ui_factory, $this->ctrl, $this->lng);
548  $switcher->addTableSwitcherToToolbar(
549  $tables,
550  self::class,
551  self::CMD_SHOW
552  );
553 
554  $switcher->addViewSwitcherToToolbar(
555  $this->table_obj->getVisibleTableViews($this->parent_obj->getRefId()),
556  $this->getTableId(),
557  self::class,
558  self::CMD_SHOW
559  );
560  }
static hasWriteAccess(int $ref, ?int $user_id=0)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ endImport()

ilDclRecordListGUI::endImport ( int  $i,
array  $warnings 
)

End import.

Exceptions
ilTemplateException

Definition at line 279 of file class.ilDclRecordListGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by importRecords().

279  : void
280  {
281  $output = new ilTemplate("tpl.dcl_import_terminated.html", true, true, "components/ILIAS/DataCollection");
282  $output->setVariable("IMPORT_TERMINATED", $this->lng->txt("dcl_import_terminated") . ": " . $i);
283  foreach ($warnings as $warning) {
284  $output->setCurrentBlock("warnings");
285  $output->setVariable("WARNING", $warning);
286  $output->parseCurrentBlock();
287  }
288  if (!count($warnings)) {
289  $output->setCurrentBlock("warnings");
290  $output->setVariable("WARNING", $this->lng->txt("dcl_no_warnings"));
291  $output->parseCurrentBlock();
292  }
293  $output->setVariable("BACK_LINK", $this->ctrl->getLinkTargetByClass(ilDclRecordListGUI::class, "listRecords"));
294  $output->setVariable("BACK", $this->lng->txt("back"));
295  $this->tpl->setContent($output->get());
296  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilDclRecordListGUI::executeCommand ( )

execute command

Exceptions
ilCtrlException

Definition at line 114 of file class.ilDclRecordListGUI.php.

References checkAccess(), ILIAS\Repository\ctrl(), listRecords(), ILIAS\Repository\lng(), setSubTabs(), and ILIAS\Repository\tabs().

114  : void
115  {
116  if (!$this->checkAccess()) {
117  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
118  return;
119  }
120 
121  $this->ctrl->saveParameter($this, self::GET_MODE);
122  $cmd = $this->ctrl->getCmd(self::CMD_SHOW);
123 
124  // 'show' fills all filters with the predefined values from the tableview,
125  // whereas 'listRecords' handels the filters "normally", filling them from the POST-variable
126  switch ($cmd) {
127  case self::CMD_SHOW:
128  $this->setSubTabs($this->mode);
129  $this->listRecords(true);
130  break;
131  case self::CMD_CANCEL_DELETE:
132  case self::CMD_LIST_RECORDS:
133  $this->setSubTabs($this->mode);
134  $this->listRecords();
135  break;
136  case self::CMD_CONFIRM_DELETE_RECORDS:
137  $this->confirmDeleteRecords();
138  break;
139  case self::CMD_DELETE_RECORDS:
140  $this->deleteRecords();
141  break;
142  case self::CMD_SHOW_IMPORT_EXCEL:
143  $this->tabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this));
144  $this->$cmd();
145  break;
146 
147  default:
148  $this->$cmd();
149  break;
150  }
151  }
setSubTabs(string $active_mode=self::GET_MODE)
listRecords(bool $use_tableview_filter=false)
+ Here is the call graph for this function:

◆ getObjId()

ilDclRecordListGUI::getObjId ( )

Definition at line 105 of file class.ilDclRecordListGUI.php.

105  : int
106  {
107  return $this->parent_obj->getObject()->getId();
108  }

◆ getRecordListTableGUI()

ilDclRecordListGUI::getRecordListTableGUI ( bool  $use_tableview_filter)
protected

Definition at line 495 of file class.ilDclRecordListGUI.php.

References $data, $table_obj, ilDclTable\getPartialRecords(), and getRefId().

Referenced by listRecords().

496  {
498 
499  $list = new ilDclRecordListTableGUI($this, "listRecords", $table_obj, $this->tableview_id, $this->mode);
500  $list->initFilter();
501  if ($use_tableview_filter) {
502  $list->initFilter();
503  $list->resetOffset();
504  $list->resetFilter();
505  $list->initFilterFromTableView();
506  }
507 
508  $list->setExternalSegmentation(true);
509  $list->setExternalSorting(true);
510  $list->determineOffsetAndOrder();
511 
512  if ($this->filter_changed) {
513  $list->resetOffset();
514  }
515 
516  $limit = $list->getLimit();
517  $offset = $list->getOffset();
518 
520  (string) $this->getRefId(),
521  $list->getOrderField(),
522  $list->getOrderDirection(),
523  $limit,
524  $offset,
525  $list->getFilter()
526  );
527  $records = $data['records'];
528  $total = $data['total'];
529 
530  $list->setMaxCount($total);
531  $list->setRecordData($records);
532 
533  $list->determineOffsetAndOrder();
534  $list->determineLimit();
535 
536  return $list;
537  }
getPartialRecords(string $ref_id, string $sort, string $direction, ?int $limit, int $offset, array $filter=[])
Return only the needed subset of record objects for the table, according to sorting, paging and filters.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRefId()

ilDclRecordListGUI::getRefId ( )

Definition at line 100 of file class.ilDclRecordListGUI.php.

Referenced by getRecordListTableGUI().

100  : int
101  {
102  return $this->parent_obj->getRefId();
103  }
+ Here is the caller graph for this function:

◆ getTableId()

ilDclRecordListGUI::getTableId ( )

Definition at line 575 of file class.ilDclRecordListGUI.php.

References $table_id.

Referenced by createSwitchers().

575  : int
576  {
577  return $this->table_id;
578  }
+ Here is the caller graph for this function:

◆ getTableviewId()

ilDclRecordListGUI::getTableviewId ( )

Definition at line 580 of file class.ilDclRecordListGUI.php.

References $tableview_id.

580  : int
581  {
582  return $this->tableview_id;
583  }

◆ importExcel()

ilDclRecordListGUI::importExcel ( )

Import Data from Excel sheet.

Definition at line 245 of file class.ilDclRecordListGUI.php.

References $table_id, ilObjDataCollectionAccess\hasPermissionToAddRecord(), importRecords(), initImportForm(), ILIAS\Repository\lng(), and showImportExcel().

245  : void
246  {
248  $this->parent_obj->getRefId(),
250  )) || !$this->table_obj->getImportEnabled()) {
251  throw new ilDclException($this->lng->txt("access_denied"));
252  }
253  $form = $this->initImportForm();
254  if ($form->checkInput()) {
255  $file = $form->getInput("import_file");
256  $file_location = $file["tmp_name"];
257  $simulate = $form->getInput("simulate");
258  $this->importRecords($file_location, (bool) $simulate);
259  } else {
260  $this->showImportExcel($form);
261  }
262  }
showImportExcel(?ilPropertyFormGUI $form=null)
static hasPermissionToAddRecord(int $ref_id, int $table_id)
importRecords(string $file, bool $simulate=false)
Import records from Excel file.
+ Here is the call graph for this function:

◆ importRecords()

ilDclRecordListGUI::importRecords ( string  $file,
bool  $simulate = false 
)
private

Import records from Excel file.

Definition at line 267 of file class.ilDclRecordListGUI.php.

References $table_id, endImport(), and ilDclContentImporter\import().

Referenced by importExcel().

267  : void
268  {
269  $importer = new ilDclContentImporter($this->parent_obj->object->getRefId(), $this->table_id);
270  $result = $importer->import($file, $simulate);
271 
272  $this->endImport($result['line'], $result['warnings']);
273  }
endImport(int $i, array $warnings)
End import.
import(string $file, bool $simulate=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initImportForm()

ilDclRecordListGUI::initImportForm ( )

Init form.

Definition at line 220 of file class.ilDclRecordListGUI.php.

References ILIAS\Repository\lng(), and ilFormPropertyGUI\setRequired().

Referenced by importExcel(), and showImportExcel().

221  {
222  $form = new ilPropertyFormGUI();
223 
224  $item = new ilCustomInputGUI();
225  $item->setHtml($this->lng->txt('dcl_file_format_description'));
226  $item->setTitle("Info");
227  $form->addItem($item);
228 
229  $file = new ilFileInputGUI($this->lng->txt("import_file"), "import_file");
230  $file->setRequired(true);
231  $form->addItem($file);
232 
233  $cb = new ilCheckboxInputGUI($this->lng->txt("dcl_simulate_import"), "simulate");
234  $cb->setInfo($this->lng->txt("dcl_simulate_info"));
235  $form->addItem($cb);
236 
237  $form->addCommandButton("importExcel", $this->lng->txt("import"));
238 
239  return $form;
240  }
This class represents a file property in a property form.
setRequired(bool $a_required)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listRecords()

ilDclRecordListGUI::listRecords ( bool  $use_tableview_filter = false)

Definition at line 153 of file class.ilDclRecordListGUI.php.

References $message, $table_id, createSwitchers(), ILIAS\Repository\ctrl(), getRecordListTableGUI(), ilObjDataCollectionAccess\hasAccessToFields(), ilObjDataCollectionAccess\hasPermissionToAddRecord(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), null, ILIAS\Repository\refinery(), and ILIAS\Repository\toolbar().

Referenced by applyFilter(), executeCommand(), and resetFilter().

153  : void
154  {
155  $list = $this->getRecordListTableGUI($use_tableview_filter);
156 
157  $this->createSwitchers();
158 
159  $permission_to_add_or_import = ilObjDataCollectionAccess::hasPermissionToAddRecord(
160  $this->parent_obj->getRefId(),
162  ) && $this->table_obj->hasCustomFields();
163  if ($permission_to_add_or_import) {
164  $this->ctrl->setParameterByClass(ilDclRecordEditGUI::class, "record_id", null);
165 
166  $add_new = $this->ui_factory->button()->primary(
167  $this->lng->txt("dcl_add_new_record"),
168  $this->ctrl->getFormActionByClass(ilDclRecordEditGUI::class, "create")
169  );
170  $this->toolbar->addStickyItem($add_new);
171  }
172 
173  if ($permission_to_add_or_import && $this->table_obj->getImportEnabled()) {
174  $this->ctrl->setParameterByClass(ilDclRecordEditGUI::class, "record_id", null);
175 
176  $import_button = $this->ui_factory->button()->standard(
177  $this->lng->txt("dcl_import_records .xls"),
178  $this->ctrl->getFormActionByClass(ilDclRecordListGUI::class, self::CMD_SHOW_IMPORT_EXCEL)
179  );
180  $this->toolbar->addComponent($import_button);
181  }
182 
183  if (count($this->table_obj->getRecordFields()) == 0) {
184  $message = $this->lng->txt("dcl_no_fields_yet") . " "
186  $this->parent_obj->getRefId(),
188  ) ? $this->lng->txt("dcl_create_fields") : "");
189  $this->tpl->setOnScreenMessage('info', $message, true);
190  }
191 
192  $target = '';
193  if ($this->http->wrapper()->query()->has('table_id')) {
194  $target .= $this->http->wrapper()->query()->retrieve('table_id', $this->refinery->to()->string());
195  }
196  if ($this->http->wrapper()->query()->has('tableview_id')) {
197  $target .= '_' . $this->http->wrapper()->query()->retrieve('tableview_id', $this->refinery->to()->string());
198  }
199 
200  $this->tpl->setPermanentLink("dcl", $this->parent_obj->getRefId(), $target);
201 
202  if ($desc = $this->table_obj->getDescription()) {
203  $desc = $this->refinery->string()->markdown()->toHTML()->transform($desc);
204  $desc = '<div class="ilDclTableDescription">' . $desc . '</div>';
205  }
206  $this->tpl->setContent($desc . $list->getHTML());
207  }
getRecordListTableGUI(bool $use_tableview_filter)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static hasAccessToFields(int $ref_id, int $table_id)
static http()
Fetches the global http state from ILIAS.
static hasPermissionToAddRecord(int $ref_id, int $table_id)
$message
Definition: xapiexit.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recordBelongsToCollection()

ilDclRecordListGUI::recordBelongsToCollection ( ilDclBaseRecordModel  $record)
private

Definition at line 464 of file class.ilDclRecordListGUI.php.

References ilDclBaseRecordModel\getTable().

Referenced by sendFile().

464  : bool
465  {
466  $table = $record->getTable();
467  $obj_id = $this->parent_obj->object->getId();
468  $obj_id_rec = $table->getCollectionObject()->getId();
469 
470  return $obj_id == $obj_id_rec;
471  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetFilter()

ilDclRecordListGUI::resetFilter ( )
protected
Exceptions
ilCtrlException

Definition at line 314 of file class.ilDclRecordListGUI.php.

References listRecords().

314  : void
315  {
316  $table = new ilDclRecordListTableGUI($this, "show", $this->table_obj, $this->tableview_id);
317  $table->initFilter();
318  $table->resetOffset();
319  $table->resetFilter();
320  $this->filter_changed = true;
321  $this->listRecords();
322  }
listRecords(bool $use_tableview_filter=false)
+ Here is the call graph for this function:

◆ sendFile()

ilDclRecordListGUI::sendFile ( )

send File to User

Definition at line 327 of file class.ilDclRecordListGUI.php.

References $message, $ref_id, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilFileDelivery\deliverFileLegacy(), ilDclCache\getRecordCache(), ilDclCache\getRecordFieldCache(), ilDclCache\getRecordRepresentation(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), null, ilDclPropertyFormGUI\rebuildTempFileByHash(), recordBelongsToCollection(), ILIAS\Repository\refinery(), and ILIAS\Repository\tabs().

327  : void
328  {
329  $hasIlFileHash = $this->http->wrapper()->query()->has('ilfilehash');
330  //need read access to receive file
331  if ($this->access->checkAccess('read', "", $this->parent_obj->getRefId())) {
332  // deliver temp-files
333  if ($hasIlFileHash) {
334  $filehash = $this->http->wrapper()->query()->retrieve(
335  'ilfilehash',
336  $this->refinery->kindlyTo()->string()
337  );
338  $field_id = $this->http->wrapper()->query()->retrieve('field_id', $this->refinery->kindlyTo()->int());
340 
341  $filepath = $_FILES["field_" . $field_id]['tmp_name'];
342  $filetitle = $_FILES["field_" . $field_id]['name'];
343 
344  ilFileDelivery::deliverFileLegacy($filepath, $filetitle);
345  } else {
346  $rec_id = $this->http->wrapper()
347  ->query()
348  ->retrieve('record_id', $this->refinery->kindlyTo()->int());
349 
350  $record = ilDclCache::getRecordCache($rec_id);
351  if (!$this->recordBelongsToCollection($record)) {
352  return;
353  }
354 
355  $field_id = $this->http->wrapper()
356  ->query()
357  ->retrieve('field_id', $this->refinery->kindlyTo()->string());
358 
359 
360 
361  // Find the current revision
362  $rid_string = $record->getRecordFieldValue($field_id);
363  $identification = $this->irss->manage()->find($rid_string);
364  if ($identification === null) {
365  return;
366  }
367  $current_revision = $this->irss->manage()->getCurrentRevision($identification);
368 
369  // Download the File
370  $this->irss->consume()
371  ->download($identification)
372  ->overrideFileName($current_revision->getTitle())
373  ->run();
374  }
375  }
376  }
recordBelongsToCollection(ilDclBaseRecordModel $record)
static rebuildTempFileByHash(string $hash)
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
static getRecordCache(?int $record_id)
+ Here is the call graph for this function:

◆ setSubTabs()

ilDclRecordListGUI::setSubTabs ( string  $active_mode = self::GET_MODE)
protected

Definition at line 473 of file class.ilDclRecordListGUI.php.

References $ref_id, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

473  : void
474  {
475  $this->ctrl->setParameter($this, self::GET_MODE, self::MODE_VIEW);
476  $this->tabs->addSubTab(
477  self::MODE_VIEW,
478  $this->lng->txt('view'),
479  $this->ctrl->getLinkTarget($this, self::CMD_LIST_RECORDS)
480  );
481 
482  $ref_id = $this->http->wrapper()->query()->retrieve('ref_id', $this->refinery->kindlyTo()->int());
483  if ($this->table_obj->hasPermissionToDeleteRecords($ref_id)) {
484  $this->ctrl->setParameter($this, self::GET_MODE, self::MODE_MANAGE);
485  $this->tabs->addSubTab(
486  self::MODE_MANAGE,
487  $this->lng->txt('dcl_manage'),
488  $this->ctrl->getLinkTarget($this, self::CMD_LIST_RECORDS)
489  );
490  }
491  $this->tabs->activateSubTab($active_mode);
492  $this->ctrl->clearParameters($this);
493  }
static http()
Fetches the global http state from ILIAS.
$ref_id
Definition: ltiauth.php:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showImportExcel()

ilDclRecordListGUI::showImportExcel ( ?ilPropertyFormGUI  $form = null)

Definition at line 209 of file class.ilDclRecordListGUI.php.

References initImportForm().

Referenced by importExcel().

209  : void
210  {
211  if (!$form) {
212  $form = $this->initImportForm();
213  }
214  $this->tpl->setContent($form->getHTML());
215  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilDclRecordListGUI::$access
private

Definition at line 35 of file class.ilDclRecordListGUI.php.

◆ $available_modes

array ilDclRecordListGUI::$available_modes = [self::MODE_VIEW, self::MODE_MANAGE]
staticprotected

Definition at line 49 of file class.ilDclRecordListGUI.php.

◆ $ctrl

ilCtrl ilDclRecordListGUI::$ctrl
protected

Definition at line 51 of file class.ilDclRecordListGUI.php.

◆ $filter_changed

bool ilDclRecordListGUI::$filter_changed = false
protected

Definition at line 58 of file class.ilDclRecordListGUI.php.

◆ $http

ILIAS HTTP Services ilDclRecordListGUI::$http
protected

Definition at line 55 of file class.ilDclRecordListGUI.php.

◆ $irss

ILIAS ResourceStorage Services ilDclRecordListGUI::$irss
protected

Definition at line 57 of file class.ilDclRecordListGUI.php.

◆ $lng

ilLanguage ilDclRecordListGUI::$lng
protected

Definition at line 53 of file class.ilDclRecordListGUI.php.

◆ $mode

string ilDclRecordListGUI::$mode = self::MODE_VIEW
protected

Stores current mode active.

Definition at line 43 of file class.ilDclRecordListGUI.php.

Referenced by __construct().

◆ $obj_id

int ilDclRecordListGUI::$obj_id
protected

Definition at line 46 of file class.ilDclRecordListGUI.php.

◆ $parent_obj

ilObjDataCollectionGUI ilDclRecordListGUI::$parent_obj
protected

Definition at line 47 of file class.ilDclRecordListGUI.php.

◆ $refinery

ILIAS Refinery Factory ilDclRecordListGUI::$refinery
protected

Definition at line 56 of file class.ilDclRecordListGUI.php.

◆ $renderer

ILIAS UI Renderer ilDclRecordListGUI::$renderer
protected

Definition at line 38 of file class.ilDclRecordListGUI.php.

◆ $table_id

int ilDclRecordListGUI::$table_id
protected

◆ $table_obj

ilDclTable ilDclRecordListGUI::$table_obj
protected

Definition at line 44 of file class.ilDclRecordListGUI.php.

Referenced by getRecordListTableGUI().

◆ $tableview_id

int ilDclRecordListGUI::$tableview_id
protected

Definition at line 48 of file class.ilDclRecordListGUI.php.

Referenced by __construct(), checkAccess(), and getTableviewId().

◆ $tabs

ilTabsGUI ilDclRecordListGUI::$tabs
protected

Definition at line 54 of file class.ilDclRecordListGUI.php.

◆ $toolbar

ilToolbarGUI ilDclRecordListGUI::$toolbar
protected

Definition at line 52 of file class.ilDclRecordListGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilDclRecordListGUI::$tpl
private

Definition at line 36 of file class.ilDclRecordListGUI.php.

◆ $ui_factory

ILIAS UI Factory ilDclRecordListGUI::$ui_factory
protected

Definition at line 37 of file class.ilDclRecordListGUI.php.

◆ CMD_CANCEL_DELETE

const ilDclRecordListGUI::CMD_CANCEL_DELETE = 'cancelDelete'

Definition at line 31 of file class.ilDclRecordListGUI.php.

◆ CMD_CONFIRM_DELETE_RECORDS

const ilDclRecordListGUI::CMD_CONFIRM_DELETE_RECORDS = 'confirmDeleteRecords'

Definition at line 30 of file class.ilDclRecordListGUI.php.

◆ CMD_DELETE_RECORDS

const ilDclRecordListGUI::CMD_DELETE_RECORDS = 'deleteRecords'

Definition at line 32 of file class.ilDclRecordListGUI.php.

◆ CMD_LIST_RECORDS

const ilDclRecordListGUI::CMD_LIST_RECORDS = 'listRecords'

◆ CMD_SHOW

const ilDclRecordListGUI::CMD_SHOW = 'show'

Definition at line 29 of file class.ilDclRecordListGUI.php.

◆ CMD_SHOW_IMPORT_EXCEL

const ilDclRecordListGUI::CMD_SHOW_IMPORT_EXCEL = 'showImportExcel'

Definition at line 33 of file class.ilDclRecordListGUI.php.

◆ GET_MODE

const ilDclRecordListGUI::GET_MODE = "mode"

Definition at line 25 of file class.ilDclRecordListGUI.php.

◆ GET_TABLE_ID

const ilDclRecordListGUI::GET_TABLE_ID = 'table_id'

Definition at line 23 of file class.ilDclRecordListGUI.php.

◆ GET_TABLEVIEW_ID

const ilDclRecordListGUI::GET_TABLEVIEW_ID = 'tableview_id'

Definition at line 24 of file class.ilDclRecordListGUI.php.

◆ MODE_MANAGE

const ilDclRecordListGUI::MODE_MANAGE = "manage"

Definition at line 27 of file class.ilDclRecordListGUI.php.

Referenced by ilDclRecordListTableGUI\buildData().

◆ MODE_VIEW

const ilDclRecordListGUI::MODE_VIEW = "view"

Definition at line 26 of file class.ilDclRecordListGUI.php.


The documentation for this class was generated from the following file: