19declare(strict_types=1);
35 private DataFactory $data_factory,
36 private UIRenderer $ui_renderer,
37 private UIFactory $ui_factory,
42 $this->
setId(
'obj_cp_prog_tbl_' . $id);
48 $this->objects = $ref_ids;
58 $this->main_tpl->addOnLoadCode(
'il.CopyRedirection.setRedirectUrl("' .
$url .
'")');
61 public function init(): void
63 $this->main_tpl->addJavaScript(
'assets/js/ilCopyRedirection.js');
64 $this->main_tpl->addOnLoadCode(
'il.CopyRedirection.checkDone()');
68 $this->
setRowTemplate(
'tpl.object_copy_progress_table_row.html',
'components/ILIAS/ILIASObject');
70 $this->
addColumn($this->
lng->txt(
'obj_target_location'));
74 protected function fillRow(array $set): void
76 $this->tpl->setVariable(
'VAL_ID', $set[
'ref_id']);
77 $this->tpl->setVariable(
'OBJ_TITLE', $set[
'title']);
79 if (strlen($set[
'description'])) {
80 $this->tpl->setVariable(
'VAL_DESC', $set[
'description']);
83 $this->tpl->setVariable(
'TYPE_IMG',
ilObject::_getIcon($set[
'obj_id'],
"small", $set[
'type']));
84 $this->tpl->setVariable(
'TYPE_STR', $this->
lng->txt(
'obj_' . $set[
'type']));
89 $progress_endpoint = $this->data_factory->uri(
90 ILIAS_HTTP_PATH .
'/' .
91 $this->
ctrl->getLinkTarget(
92 $this->getParentObject(),
99 $progress_bar = $this->ui_factory->progress()->bar(
100 sprintf($this->
lng->txt(
'obj_copy_progress_to'), $set[
'title']),
104 $this->tpl->setVariable(
'PROGRESS_BAR', $this->ui_renderer->render($progress_bar));
107 $this->main_tpl->addOnLoadCode(
"
108 il.UI.Progress.Bar.indeterminate(
109 '{$progress_bar->getUpdateSignal()}',
110 '{$this->lng->txt('obj_copy_progress_estimate')}'
122 $set[
$counter][
'copy_id'] = $copy_id;
130 $set[
$counter][
'max_steps'] = $copy_info->getRequiredSteps();
Builds a Color from either hex- or rgb values.
static _getInstance(int $a_copy_id)
GUI class for the workflow of copying objects.
Table gui for copy progress.
__construct(private DataFactory $data_factory, private UIRenderer $ui_renderer, private UIFactory $ui_factory, ilObjectCopyGUI $parent_obj, string $parent_cmd, int $id,)
fillRow(array $set)
Standard Version of Fill Row.
setRedirectionUrl(?string $url)
setObjectInfo(array $ref_ids)
static _lookupType(int $id, bool $reference=false)
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)
static _lookupDescription(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
An entity that renders components to a string output.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc