19declare(strict_types=1);
46 $ilCtrl =
$DIC[
'ilCtrl'];
47 $this->ui_factory =
$DIC->ui()->factory();
48 $this->ui_renderer =
$DIC->ui()->renderer();
56 $this->
addColumn($this->
lng->txt(
'title'),
'category',
'99%');
62 $local_dic = QuestionPoolDIC::dic();
63 $this->request = $local_dic[
'request_data_collector'];
64 $ref_id = $this->request->getRefId();
66 if ($type ===
'assf') {
67 $hasAccess =
$DIC->rbac()->system()->checkAccess(
'edit',
$ref_id);
69 $hasAccess =
$DIC->access()->checkAccess(
'edit', $cmd,
$ref_id);
81 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject(), $cmd));
83 $this->
setRowTemplate(
'tpl.unit_category_row.html',
'components/ILIAS/TestQuestionPool');
100 $actions[] = $this->ui_factory->link()->standard($this->
lng->txt(
'un_show_units'), $this->ctrl->getLinkTarget($this->getParentObject(),
'showUnitsOfCategory'));
101 $ref_id = $this->request->getRefId();
103 if ($type ===
'assf') {
104 $hasAccess =
$DIC->rbac()->system()->checkAccess(
'edit',
$ref_id);
106 $hasAccess =
$DIC->access()->checkAccess(
'edit',
'showUnitCategoryModificationForm',
$ref_id) &&
107 $DIC->access()->checkAccess(
'edit',
'confirmDeleteCategory',
$ref_id);
111 $actions[] = $this->ui_factory->link()->standard($this->
lng->txt(
'edit'), $this->ctrl->getLinkTarget($this->getParentObject(),
'showUnitCategoryModificationForm'));
112 $actions[] = $this->ui_factory->link()->standard($this->
lng->txt(
'delete'), $this->ctrl->getLinkTarget($this->getParentObject(),
'confirmDeleteCategory'));
115 $actions[] = $this->ui_factory->link()->standard($this->
lng->txt(
'import'), $this->ctrl->getLinkTarget($this->getParentObject(),
'confirmImportGlobalCategory'));
117 $row[
'title_href'] = $this->
ctrl->getLinkTarget($this->
getParentObject(),
'showUnitsOfCategory');
119 $dropdown = $this->ui_factory->dropdown()->standard($actions)->withLabel($this->
lng->txt(
'actions'));
120 $row[
'actions'] = $this->ui_renderer->render($dropdown);
122 $row[
'category'] = $this->
refinery->encode()->htmlSpecialCharsAsEntities()->transform($row[
'category']);
123 $row[
'category_link_title'] = $this->
refinery->encode()->htmlAttributeValue()->transform(
127 parent::fillRow($row);
static _lookupType(int $id, bool $reference=false)
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="", string $a_template_context="")
addMultiCommand(string $a_cmd, string $a_text)
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)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
Class ilUnitCategoryTableGUI @abstract.
RequestDataCollector $request
ILIAS Refinery Factory $refinery
ILIAS UI Renderer $ui_renderer
ILIAS UI Factory $ui_factory
Class ilUnitConfigurationGUI.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc