19 declare(strict_types=1);
36 protected string $title,
38 protected string $type,
48 protected function getId(): string
60 $request = $this->gui->editing()->request();
61 return $this->domain->subObjectRetrieval(
65 $request->getTranslation()
76 $lng = $this->domain->lng();
77 $f = $this->gui->ui()->factory();
78 if ($data_row[
"type"] ===
"pg") {
79 $img_sc = $data_row[
"scheduled"]
83 if (!$data_row[
"active"]) {
84 $img =
"standard/icon_pg_d" . $img_sc .
".svg";
85 $alt =
$lng->txt(
"cont_page_deactivated");
87 if ($data_row[
"deactivated_elements"]) {
88 $img =
"standard/icon_pg_del" . $img_sc .
".svg";
89 $alt =
$lng->txt(
"cont_page_deactivated_elements");
91 $img =
"standard/icon_pg" . $img_sc .
".svg";
92 $alt =
$lng->txt(
"pg");
96 $img =
"standard/icon_st.svg";
97 $alt =
$lng->txt(
"st");
100 "id" => $data_row[
"id"],
102 "title" => $data_row[
"title"],
103 "trans_title" => $data_row[
"trans_title"],
109 $lng = $this->domain->lng();
110 $user = $this->domain->user();
111 $transl = $this->gui->editing()->request()->getTranslation();
114 ->textColumn(
"title",
$lng->txt(
"title"));
115 if (!in_array($transl, [
"-",
""])) {
117 " (" .
$lng->txt(
"meta_l_" . $transl) .
")");
119 if ($this->type ===
"st") {
124 [\ilObjLearningModuleGUI::class, \ilStructureObjectGUI::class, EditSubObjectsGUI::class],
129 "insertChapterAfter",
130 $lng->txt(
"lm_insert_chapter_after"),
131 [EditSubObjectsGUI::class],
132 "insertChapterAfter",
136 "insertChapterBefore",
137 $lng->txt(
"lm_insert_chapter_before"),
138 [EditSubObjectsGUI::class],
139 "insertChapterBefore",
143 if ($user->clipboardHasObjectsOfType(
"st")) {
145 "insertChapterClipAfter",
146 $lng->txt(
"lm_insert_chapter_clip_after"),
147 [EditSubObjectsGUI::class],
148 "insertChapterClipAfter",
152 "insertChapterClipBefore",
153 $lng->txt(
"lm_insert_chapter_clip_before"),
154 [EditSubObjectsGUI::class],
155 "insertChapterClipBefore",
164 [\ilObjLearningModuleGUI::class, \ilLMPageObjectGUI::class],
170 $lng->txt(
"lm_insert_page_after"),
171 [EditSubObjectsGUI::class],
177 $lng->txt(
"lm_insert_page_before"),
178 [EditSubObjectsGUI::class],
183 if ($user->clipboardHasObjectsOfType(
"pg")) {
185 "insertPageClipAfter",
186 $lng->txt(
"lm_insert_page_clip_after"),
187 [EditSubObjectsGUI::class],
188 "insertPageClipAfter",
192 "insertPageClipBefore",
193 $lng->txt(
"lm_insert_page_clip_before"),
194 [EditSubObjectsGUI::class],
195 "insertPageClipBefore",
199 if (count($this->page_layouts) > 0) {
202 $lng->txt(
"lm_insert_layout_after"),
203 [EditSubObjectsGUI::class],
208 "insertLayoutBefore",
209 $lng->txt(
"lm_insert_layout_before"),
210 [EditSubObjectsGUI::class],
211 "insertLayoutBefore",
216 foreach ($acts as
$a) {
232 $lng->txt(
"cont_edit_title"),
243 if ($this->type ===
"pg") {
246 $lng->txt(
"cont_de_activate")
singleRedirectAction(string $action, string $title, array $class_path, string $cmd="", string $id_param="")
textColumn(string $key, string $title, bool $sortable=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static activeLayouts(int $a_module=0)
Get active layouts.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
iconColumn(string $key, string $title, bool $sortable=false)
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected string $title, protected int $lm_id, protected string $type, object $parent_gui, string $parent_cmd)
standardAction(string $action, string $title)
__construct(Container $dic, ilPlugin $plugin)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
transformRow(array $data_row)
build(TableAdapterGUI $table)