3 declare(strict_types=1);
32 public function __construct(
object $a_parent_obj,
string $a_parent_cmd =
'')
34 $this->
setId(
'sc_groups');
38 $this->renderer = $DIC->ui()->renderer();
39 $this->uiFactory = $DIC->ui()->factory();
42 public function init(): void
44 $this->
lng->loadLanguageModule(
'sysc');
45 $this->
addColumn($this->
lng->txt(
'title'),
'title',
'60%');
46 $this->
addColumn($this->
lng->txt(
'last_update'),
'last_update_sort',
'20%');
47 $this->
addColumn($this->
lng->txt(
'sysc_completed_num'),
'completed',
'10%');
48 $this->
addColumn($this->
lng->txt(
'sysc_failed_num'),
'failed',
'10%');
53 $this->
setRowTemplate(
'tpl.syscheck_groups_row.html',
'Services/SystemCheck');
57 protected function fillRow(array $a_set): void
59 $this->tpl->setVariable(
'VAL_TITLE', (
string) ($a_set[
'title'] ??
''));
61 $id = (
int) ($a_set[
'id'] ?? 0);
63 $this->tpl->setVariable(
65 $this->
ctrl->getLinkTarget($this->getParentObject(),
'showGroup')
68 $this->tpl->setVariable(
'VAL_DESC', (
string) ($a_set[
'description'] ??
''));
69 $this->tpl->setVariable(
'VAL_LAST_UPDATE', (
string) ($a_set[
'last_update'] ??
''));
70 $this->tpl->setVariable(
'VAL_COMPLETED', (
int) ($a_set[
'completed'] ?? 0));
71 $this->tpl->setVariable(
'VAL_FAILED', (
int) ($a_set[
'failed'] ?? 0));
73 switch ($a_set[
'status']) {
75 $this->tpl->setVariable(
'STATUS_CLASS',
'smallgreen');
78 $this->tpl->setVariable(
'STATUS_CLASS',
'warning');
84 $dropDownItems = array(
85 $this->uiFactory->button()->shy(
86 $this->
lng->txt(
'show'),
90 $dropDown = $this->uiFactory->dropdown()->standard($dropDownItems)
91 ->withLabel($this->
lng->txt(
'actions'));
93 $this->tpl->setVariable(
'ACTIONS', $this->renderer->render($dropDown));
102 $item[
'id'] = $group->getId();
106 $item[
'title'] = $task_gui->getGroupTitle();
107 $item[
'description'] = $task_gui->getGroupDescription();
108 $item[
'status'] = $group->getStatus();
115 $item[
'last_update_sort'] = $last_update->get(
IL_CAL_UNIX);
setFormAction(string $a_form_action, bool $a_multipart=false)
static lookupLastUpdate(int $a_grp_id)
static lookupFailed(int $a_grp_id)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(object $a_parent_obj, string $a_parent_cmd='')
static lookupCompleted(int $a_grp_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getComponentTaskGUIForGroup(int $a_group_id, ?int $a_task_id=null)
UIImplementationFactory $uiFactory
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)