ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclRecordListGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilDclRecordListGUI:

Public Member Functions

 __construct (ilObjDataCollectionGUI $a_parent_obj, int $table_id, int $tableview_id)
 
 getRefId ()
 
 getObjId ()
 
 executeCommand ()
 execute command More...
 
 showImportExcel (?ilPropertyFormGUI $form=null)
 
 initImportForm ()
 Init form. More...
 
 importExcel ()
 Import Data from Excel sheet. More...
 
 endImport (int $i, array $warnings)
 End import. More...
 
 doTableSwitch ()
 doTableSwitch More...
 
 doTableViewSwitch ()
 doTableViewSwitch 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)
 
 getAvailableTables ()
 
 getRecordListTableGUI (bool $use_tableview_filter)
 
 createSwitchers ()
 
 checkAccess ()
 

Protected Attributes

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 $ilToolbar
 
ilLanguage $lng
 
ilTabsGUI $tabs
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
bool $filter_changed = false
 

Static Protected Attributes

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

Private Member Functions

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

Private Attributes

ilDataCollectionUiPort $dclUi
 
ilDataCollectionAccessPort $dclAccess
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Definition at line 19 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\ctrl(), ilObjectGUI\getObject(), ilDclCache\getTableCache(), ILIAS\FileDelivery\http(), init(), ILIAS\Repository\lng(), ilDataCollectionOutboundsAdapter\new(), ILIAS\Repository\refinery(), and ILIAS\Repository\tabs().

64  {
65  global $DIC;
66 
68 
69  $this->ctrl = $DIC->ctrl();
70  $this->ilToolbar = $DIC->toolbar();
71  $this->lng = $DIC->language();
72  $this->tabs = $DIC->tabs();
73  $this->http = $DIC->http();
74  $this->refinery = $DIC->refinery();
75 
76  $this->table_id = $table_id;
77  $this->tableview_id = $tableview_id;
78 
79  $this->obj_id = $a_parent_obj->getObject()->getId();
80  $this->parent_obj = $a_parent_obj;
81  $this->table_obj = ilDclCache::getTableCache($table_id);
82 
83  $this->ctrl->setParameterByClass(ilDclRecordEditGUI::class, self::GET_TABLE_ID, $this->table_id);
84  $this->ctrl->setParameterByClass(ilDclRecordEditGUI::class, self::GET_TABLEVIEW_ID, $this->tableview_id);
85  $this->ctrl->setParameterByClass(ilDclDetailedViewGUI::class, self::GET_TABLEVIEW_ID, $this->tableview_id);
86 
87  $this->mode = self::MODE_VIEW;
88 
89  if ($this->http->wrapper()->query()->has(self::GET_MODE)) {
90  $mode = $this->http->wrapper()->query()->retrieve(self::GET_MODE, $this->refinery->kindlyTo()->string());
91  if (in_array($mode, self::$available_modes, true)) {
92  $this->mode = $mode;
93  }
94  }
95  }
init(ilDataCollectionOutboundsAdapter $adapter)
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
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 322 of file class.ilDclRecordListGUI.php.

322  : void
323  {
324  $table = new ilDclRecordListTableGUI($this, "listRecords", $this->table_obj, $this->tableview_id);
325  $table->initFilter();
326  $table->resetOffset();
327  $table->writeFilterToSession();
328  $this->filter_changed = true;
329  $this->listRecords();
330  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ checkAccess()

ilDclRecordListGUI::checkAccess ( )
protected

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

References $table_id, and $tableview_id.

Referenced by executeCommand().

603  : bool
604  {
605  return ilObjDataCollectionAccess::hasAccessTo(
606  $this->parent_obj->getRefId(),
609  );
610  }
+ Here is the caller graph for this function:

◆ createSwitchers()

ilDclRecordListGUI::createSwitchers ( )
protected

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

References $ilToolbar, ilToolbarGUI\addButtonInstance(), ilToolbarGUI\addInputItem(), ilToolbarGUI\addSeparator(), ilToolbarGUI\addText(), ILIAS\Repository\ctrl(), getAvailableTables(), ilSubmitButton\getInstance(), ILIAS\Repository\lng(), and ilToolbarGUI\setFormAction().

Referenced by executeCommand().

561  : void
562  {
564  $ilToolbar->setFormAction($this->ctrl->getFormActionByClass("ilDclRecordListGUI", "doTableSwitch"));
565 
566  //table switcher
567  $options = $this->getAvailableTables();
568  if (count($options) > 1) {
569  $table_selection = new ilSelectInputGUI('', 'table_id');
570  $table_selection->setOptions($options);
571  $table_selection->setValue($this->table_id);
572 
573  $ilToolbar->addText($this->lng->txt("dcl_table"));
574  $ilToolbar->addInputItem($table_selection);
575  $button = ilSubmitButton::getInstance();
576  $button->setCaption('change');
577  $button->setCommand('doTableSwitch');
578  $ilToolbar->addButtonInstance($button);
580  }
581 
582  //tableview switcher
583  $options = [];
584  foreach ($this->table_obj->getVisibleTableViews($this->parent_obj->getRefId()) as $tableview) {
585  $options[$tableview->getId()] = $tableview->getTitle();
586  }
587 
588  if (count($options) > 1) {
589  $tableview_selection = new ilSelectInputGUI('', 'tableview_id');
590  $tableview_selection->setOptions($options);
591  $tableview_selection->setValue($this->tableview_id);
592  $ilToolbar->addText($this->lng->txt("dcl_tableview"));
593  $ilToolbar->addInputItem($tableview_selection);
594 
595  $button = ilSubmitButton::getInstance();
596  $button->setCaption('change');
597  $button->setCommand('doTableViewSwitch');
598  $ilToolbar->addButtonInstance($button);
600  }
601  }
addText(string $a_text)
setFormAction(string $a_val, bool $a_multipart=false, string $a_target="")
Set form action (if form action is set, toolbar is wrapped into form tags)
addButtonInstance(ilButtonBase $a_button)
Add button instance.
addInputItem(ilToolbarItem $a_item, bool $a_output_label=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doTableSwitch()

ilDclRecordListGUI::doTableSwitch ( )

doTableSwitch

Exceptions
ilCtrlException

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

References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

298  : void
299  {
300  $this->ctrl->clearParameters($this);
301  $table_id = $this->http->wrapper()->post()->retrieve('table_id', $this->refinery->kindlyTo()->int());
302  $this->ctrl->setParameterByClass(ilObjDataCollectionGUI::class, "table_id", $table_id);
303  $this->ctrl->setParameter($this, "table_id", $table_id);
304  $this->ctrl->clearParametersByClass(ilObjDataCollectionGUI::class);
305  $this->ctrl->redirect($this, self::CMD_SHOW);
306  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ doTableViewSwitch()

ilDclRecordListGUI::doTableViewSwitch ( )

doTableViewSwitch

Exceptions
ilCtrlException

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

References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

312  : void
313  {
314  $tableview_id = $this->http->wrapper()->post()->retrieve('tableview_id', $this->refinery->kindlyTo()->int());
315  $this->ctrl->setParameterByClass("ilObjDataCollectionGUI", "tableview_id", $tableview_id);
316  $this->ctrl->redirect($this, self::CMD_SHOW);
317  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ endImport()

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

End import.

Exceptions
ilTemplateException

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

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

Referenced by importRecords().

275  : void
276  {
277  $output = new ilTemplate("tpl.dcl_import_terminated.html", true, true, "Modules/DataCollection");
278  $output->setVariable("IMPORT_TERMINATED", $this->lng->txt("dcl_import_terminated") . ": " . $i);
279  foreach ($warnings as $warning) {
280  $output->setCurrentBlock("warnings");
281  $output->setVariable("WARNING", $warning);
282  $output->parseCurrentBlock();
283  }
284  if (!count($warnings)) {
285  $output->setCurrentBlock("warnings");
286  $output->setVariable("WARNING", $this->lng->txt("dcl_no_warnings"));
287  $output->parseCurrentBlock();
288  }
289  $output->setVariable("BACK_LINK", $this->ctrl->getLinkTargetByClass("ilDclRecordListGUI", "listRecords"));
290  $output->setVariable("BACK", $this->lng->txt("back"));
291  $this->dclUi->setContent($output->get());
292  }
$i
Definition: metadata.php:41
+ 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 111 of file class.ilDclRecordListGUI.php.

References $DIC, $ilSetting, $table_id, $tableview_id, ilToolbarGUI\addButtonInstance(), ilToolbarGUI\addStickyItem(), checkAccess(), createSwitchers(), ILIAS\Repository\ctrl(), ilLinkButton\getInstance(), getRecordListTableGUI(), ilObjDataCollectionAccess\hasAccessToFields(), ilObjDataCollectionAccess\hasPermissionToAddRecord(), ILIAS\Repository\lng(), setSubTabs(), and ILIAS\Repository\tabs().

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

◆ getAvailableTables()

ilDclRecordListGUI::getAvailableTables ( )
protected
Returns
string[]

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

References ilObjDataCollectionAccess\hasWriteAccess().

Referenced by createSwitchers().

502  : array
503  {
504  if (ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->getRefId())) {
505  $tables = $this->parent_obj->object->getTables();
506  } else {
507  $tables = $this->parent_obj->object->getVisibleTables();
508  }
509  $options = [];
510  foreach ($tables as $table) {
511  $options[$table->getId()] = $table->getTitle();
512  }
513 
514  return $options;
515  }
static hasWriteAccess(int $ref, ?int $user_id=0)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObjId()

ilDclRecordListGUI::getObjId ( )

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

102  : int
103  {
104  return $this->parent_obj->getObject()->getId();
105  }

◆ getRecordListTableGUI()

ilDclRecordListGUI::getRecordListTableGUI ( bool  $use_tableview_filter)
protected

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

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

Referenced by executeCommand().

518  {
520 
521  $list = new ilDclRecordListTableGUI($this, "listRecords", $table_obj, $this->tableview_id, $this->mode);
522  $list->initFilter();
523  if ($use_tableview_filter) {
524  $list->initFilter();
525  $list->resetOffset();
526  $list->resetFilter();
527  $list->initFilterFromTableView();
528  }
529 
530  $list->setExternalSegmentation(true);
531  $list->setExternalSorting(true);
532  $list->determineOffsetAndOrder();
533 
534  if ($this->filter_changed) {
535  $list->resetOffset();
536  }
537 
538  $limit = $list->getLimit();
539  $offset = $list->getOffset();
540 
542  (string) $this->getRefId(),
543  $list->getOrderField(),
544  $list->getOrderDirection(),
545  $limit,
546  $offset,
547  $list->getFilter()
548  );
549  $records = $data['records'];
550  $total = $data['total'];
551 
552  $list->setMaxCount($total);
553  $list->setRecordData($records);
554 
555  $list->determineOffsetAndOrder();
556  $list->determineLimit();
557 
558  return $list;
559  }
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRefId()

ilDclRecordListGUI::getRefId ( )

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

Referenced by getRecordListTableGUI().

97  : int
98  {
99  return $this->parent_obj->getRefId();
100  }
+ Here is the caller graph for this function:

◆ getTableId()

ilDclRecordListGUI::getTableId ( )

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

References $table_id.

612  : int
613  {
614  return $this->table_id;
615  }

◆ getTableviewId()

ilDclRecordListGUI::getTableviewId ( )

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

References $tableview_id.

617  : int
618  {
619  return $this->tableview_id;
620  }

◆ importExcel()

ilDclRecordListGUI::importExcel ( )

Import Data from Excel sheet.

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

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

241  : void
242  {
244  $this->parent_obj->getRefId(),
246  )) || !$this->table_obj->getImportEnabled()) {
247  throw new ilDclException($this->lng->txt("access_denied"));
248  }
249  $form = $this->initImportForm();
250  if ($form->checkInput()) {
251  $file = $form->getInput("import_file");
252  $file_location = $file["tmp_name"];
253  $simulate = $form->getInput("simulate");
254  $this->importRecords($file_location, $simulate);
255  } else {
256  $this->showImportExcel($form);
257  }
258  }
showImportExcel(?ilPropertyFormGUI $form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 263 of file class.ilDclRecordListGUI.php.

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

Referenced by importExcel().

263  : void
264  {
265  $importer = new ilDclContentImporter($this->parent_obj->object->getRefId(), $this->table_id);
266  $result = $importer->import($file, $simulate);
267 
268  $this->endImport($result['line'], $result['warnings']);
269  }
endImport(int $i, array $warnings)
End import.
import(string $file, bool $simulate=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

ilDclRecordListGUI::init ( ilDataCollectionOutboundsAdapter  $adapter)
private

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

References ilDataCollectionOutboundsAdapter\getDataCollectionAccess(), and ilDataCollectionOutboundsAdapter\getDataCollectionUi().

Referenced by __construct().

55  : void {
56  $this->dclUi = $adapter->getDataCollectionUi();
57  $this->dclAccess = $adapter->getDataCollectionAccess();
58  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initImportForm()

ilDclRecordListGUI::initImportForm ( )

Init form.

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

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

Referenced by importExcel(), and showImportExcel().

217  {
218  $form = new ilPropertyFormGUI();
219 
220  $item = new ilCustomInputGUI();
221  $item->setHtml($this->lng->txt('dcl_file_format_description'));
222  $item->setTitle("Info");
223  $form->addItem($item);
224 
225  $file = new ilFileInputGUI($this->lng->txt("import_file"), "import_file");
226  $file->setRequired(true);
227  $form->addItem($file);
228 
229  $cb = new ilCheckboxInputGUI($this->lng->txt("dcl_simulate_import"), "simulate");
230  $cb->setInfo($this->lng->txt("dcl_simulate_info"));
231  $form->addItem($cb);
232 
233  $form->addCommandButton("importExcel", $this->lng->txt("import"));
234 
235  return $form;
236  }
This class represents a file property in a property form.
This class represents a checkbox property in a property form.
setRequired(bool $a_required)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ 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 468 of file class.ilDclRecordListGUI.php.

References ilDclBaseRecordModel\getTable().

Referenced by sendFile().

468  : bool
469  {
470  $table = $record->getTable();
471  $obj_id = $this->parent_obj->object->getId();
472  $obj_id_rec = $table->getCollectionObject()->getId();
473 
474  return $obj_id == $obj_id_rec;
475  }
+ 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 335 of file class.ilDclRecordListGUI.php.

335  : void
336  {
337  $table = new ilDclRecordListTableGUI($this, "show", $this->table_obj, $this->tableview_id);
338  $table->initFilter();
339  $table->resetOffset();
340  $table->resetFilter();
341  $this->filter_changed = true;
342  $this->listRecords();
343  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ sendFile()

ilDclRecordListGUI::sendFile ( )

send File to User

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

References $filename, ILIAS\LTI\ToolProvider\$key, $ref_id, ILIAS\Repository\ctrl(), ilFileDelivery\deliverFileAttached(), ilObjFile\getFile(), ilDclCache\getRecordCache(), ilDclCache\getRecordFieldCache(), ilDclCache\getRecordRepresentation(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ilDclPropertyFormGUI\rebuildTempFileByHash(), recordBelongsToCollection(), ILIAS\Repository\refinery(), and ILIAS\Repository\tabs().

348  : void
349  {
350  $hasIlFileHash = $this->http->wrapper()->query()->has('ilfilehash');
351  //need read access to receive file
352  if ($this->dclAccess->hasReadPermission($this->parent_obj->getRefId())) {
353  // deliver temp-files
354  if ($hasIlFileHash) {
355  $filehash = $this->http->wrapper()->query()->retrieve(
356  'ilfilehash',
357  $this->refinery->kindlyTo()->string()
358  );
359  $field_id = $this->http->wrapper()->query()->retrieve('field_id', $this->refinery->kindlyTo()->int());
361 
362  $filepath = $_FILES["field_" . $field_id]['tmp_name'];
363  $filename = $_FILES["field_" . $field_id]['name'];
364  } else {
365  $rec_id = $this->http->wrapper()->query()->retrieve('record_id', $this->refinery->kindlyTo()->int());
366  $record = ilDclCache::getRecordCache($rec_id);
367  $field_id = $this->http->wrapper()->query()->retrieve('field_id', $this->refinery->kindlyTo()->int());
368  $file_obj = new ilObjFile($record->getRecordFieldValue($field_id), false);
369  if (!$this->recordBelongsToCollection($record)) {
370  return;
371  }
372  $filepath = $file_obj->getFile();
373  $filename = $file_obj->getFileName();
374  }
375 
377  }
378  }
recordBelongsToCollection(ilDclBaseRecordModel $record)
static rebuildTempFileByHash(string $hash)
static http()
Fetches the global http state from ILIAS.
static deliverFileAttached(string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, bool $delete_file=false)
Class ilObjFile.
$filename
Definition: buildRTE.php:78
static getRecordCache(?int $record_id)
getFile(?int $a_hist_entry_id=null)
+ Here is the call graph for this function:

◆ setSubTabs()

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

Definition at line 477 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().

477  : void
478  {
479  $this->ctrl->setParameter($this, self::GET_MODE, self::MODE_VIEW);
480  $this->tabs->addSubTab(
481  self::MODE_VIEW,
482  $this->lng->txt('view'),
483  $this->ctrl->getLinkTarget($this, self::CMD_LIST_RECORDS)
484  );
485 
486  $ref_id = $this->http->wrapper()->query()->retrieve('ref_id', $this->refinery->kindlyTo()->int());
487  if ($this->table_obj->hasPermissionToDeleteRecords($ref_id)) {
488  $this->ctrl->setParameter($this, self::GET_MODE, self::MODE_MANAGE);
489  $this->tabs->addSubTab(
490  self::MODE_MANAGE,
491  $this->lng->txt('dcl_manage'),
492  $this->ctrl->getLinkTarget($this, self::CMD_LIST_RECORDS)
493  );
494  }
495  $this->tabs->activateSubTab($active_mode);
496  $this->ctrl->clearParameters($this);
497  }
static http()
Fetches the global http state from ILIAS.
$ref_id
Definition: ltiauth.php:67
+ 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 205 of file class.ilDclRecordListGUI.php.

References initImportForm().

Referenced by importExcel().

205  : void
206  {
207  if (!$form) {
208  $form = $this->initImportForm();
209  }
210  $this->dclUi->setContent($form->getHTML());
211  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $available_modes

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

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

◆ $ctrl

ilCtrl ilDclRecordListGUI::$ctrl
protected

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

◆ $dclAccess

ilDataCollectionAccessPort ilDclRecordListGUI::$dclAccess
private

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

◆ $dclUi

ilDataCollectionUiPort ilDclRecordListGUI::$dclUi
private

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

◆ $filter_changed

bool ilDclRecordListGUI::$filter_changed = false
protected

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

◆ $http

ILIAS HTTP Services ilDclRecordListGUI::$http
protected

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

◆ $ilToolbar

ilToolbarGUI ilDclRecordListGUI::$ilToolbar
protected

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

Referenced by createSwitchers().

◆ $lng

ilLanguage ilDclRecordListGUI::$lng
protected

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

◆ $mode

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

Stores current mode active.

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

Referenced by __construct().

◆ $obj_id

int ilDclRecordListGUI::$obj_id
protected

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

◆ $parent_obj

ilObjDataCollectionGUI ilDclRecordListGUI::$parent_obj
protected

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

◆ $refinery

ILIAS Refinery Factory ilDclRecordListGUI::$refinery
protected

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

◆ $table_id

int ilDclRecordListGUI::$table_id
protected

◆ $table_obj

ilDclTable ilDclRecordListGUI::$table_obj
protected

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

Referenced by getRecordListTableGUI().

◆ $tableview_id

int ilDclRecordListGUI::$tableview_id
protected

◆ $tabs

ilTabsGUI ilDclRecordListGUI::$tabs
protected

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

◆ CMD_CANCEL_DELETE

const ilDclRecordListGUI::CMD_CANCEL_DELETE = 'cancelDelete'

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

◆ CMD_CONFIRM_DELETE_RECORDS

const ilDclRecordListGUI::CMD_CONFIRM_DELETE_RECORDS = 'confirmDeleteRecords'

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

◆ CMD_DELETE_RECORDS

const ilDclRecordListGUI::CMD_DELETE_RECORDS = 'deleteRecords'

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

◆ CMD_LIST_RECORDS

const ilDclRecordListGUI::CMD_LIST_RECORDS = 'listRecords'

◆ CMD_SHOW

const ilDclRecordListGUI::CMD_SHOW = 'show'

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

◆ CMD_SHOW_IMPORT_EXCEL

const ilDclRecordListGUI::CMD_SHOW_IMPORT_EXCEL = 'showImportExcel'

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

◆ GET_MODE

const ilDclRecordListGUI::GET_MODE = "mode"

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

◆ GET_TABLE_ID

const ilDclRecordListGUI::GET_TABLE_ID = 'table_id'

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

◆ GET_TABLEVIEW_ID

const ilDclRecordListGUI::GET_TABLEVIEW_ID = 'tableview_id'

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

◆ MODE_MANAGE

const ilDclRecordListGUI::MODE_MANAGE = "manage"

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

Referenced by ilDclRecordListTableGUI\buildData().

◆ MODE_VIEW

const ilDclRecordListGUI::MODE_VIEW = "view"

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


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