19declare(strict_types=1);
34 protected bool $has_write_permission,
41 protected function getId(): string
43 return 'repnwitgrptbl';
48 return $this->domain->lng()->txt(
'rep_new_item_groups');
53 $retrieval = $this->domain->newItemGroupRetrieval();
54 $unassigned_subitems = $retrieval->getUnassignedSubItemCount();
56 if ($unassigned_subitems > 0) {
57 $this->gui->mainTemplate()->setOnScreenMessage(
'info', sprintf(
58 $this->domain->lng()->txt(
'rep_new_item_group_unassigned_subitems'),
68 return $this->has_write_permission ?
'saveNewItemGroupOrder' :
'';
74 'id' => $data_row[
'id'],
75 'title' => $data_row[
'title'],
76 'subitems' => $data_row[
'subitems']
82 $lng = $this->domain->lng();
86 ->textColumn(
'subitems',
$lng->txt(
'rep_new_item_group_nr_subitems'));
88 if ($this->has_write_permission) {
93 [\ilObjRepositorySettingsGUI::class],
97 ->singleAction(
'confirmDeleteNewItemGroup',
$lng->txt(
'delete'),
true);
build(TableAdapterGUI $table)
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected bool $has_write_permission, object $parent_gui, string $parent_cmd)
transformRow(array $data_row)
transform raw data array to table row data array
textColumn(string $key, string $title, bool $sortable=false)
singleRedirectAction(string $action, string $title, array $class_path, string $cmd="", string $id_param="", bool $async=false)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc