19declare(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 $ctrl = $this->gui->ctrl();
79 if ($data_row[
"type"] ===
"pg") {
80 $img_sc = $data_row[
"scheduled"]
84 if (!$data_row[
"active"]) {
85 $img =
"standard/icon_pg_d" . $img_sc .
".svg";
86 $alt =
$lng->txt(
"cont_page_deactivated");
88 if ($data_row[
"deactivated_elements"]) {
89 $img =
"standard/icon_pg_del" . $img_sc .
".svg";
90 $alt =
$lng->txt(
"cont_page_deactivated_elements");
92 $img =
"standard/icon_pg" . $img_sc .
".svg";
93 $alt =
$lng->txt(
"pg");
97 $img =
"standard/icon_st.svg";
98 $alt =
$lng->txt(
"st");
101 if ($data_row[
"type"] ===
"pg") {
102 $ctrl->setParameterByClass(\ilLMPageGUI::class,
"obj_id", $data_row[
"id"]);
103 $target = $ctrl->getLinkTargetByClass([
104 \ilObjLearningModuleGUI::class,
105 \ilLMPageObjectGUI::class,
108 } elseif ($data_row[
"type"] ===
"st") {
109 $ctrl->setParameterByClass(\ilStructureObjectGUI::class,
"obj_id", $data_row[
"id"]);
110 $target = $ctrl->getLinkTargetByClass([
111 \ilObjLearningModuleGUI::class,
112 \ilStructureObjectGUI::class,
113 EditSubObjectsGUI::class
117 $title =
$f->link()->standard($data_row[
"title"], $target);
119 "id" => $data_row[
"id"],
122 "trans_title" => $data_row[
"trans_title"],
128 $lng = $this->domain->lng();
129 $user = $this->domain->user();
130 $transl = $this->gui->editing()->request()->getTranslation();
133 ->linkColumn(
"title",
$lng->txt(
"title"));
134 if (!in_array($transl, [
"-",
""])) {
136 " (" .
$lng->txt(
"meta_l_" . $transl) .
")");
138 if ($this->type ===
"st") {
141 $lng->txt(
"lm_list_pages"),
142 [\ilObjLearningModuleGUI::class, \ilStructureObjectGUI::class, EditSubObjectsGUI::class],
148 $lng->txt(
"cont_edit_title"),
152 "insertChapterAfter",
153 $lng->txt(
"lm_insert_chapter_after"),
157 "insertChapterBefore",
158 $lng->txt(
"lm_insert_chapter_before"),
161 if ($user->clipboardHasObjectsOfType(
"st")) {
163 "insertChapterClipAfter",
164 $lng->txt(
"lm_insert_chapter_clip_after"),
165 [EditSubObjectsGUI::class],
166 "insertChapterClipAfter",
170 "insertChapterClipBefore",
171 $lng->txt(
"lm_insert_chapter_clip_before"),
172 [EditSubObjectsGUI::class],
173 "insertChapterClipBefore",
180 $lng->txt(
"lm_edit_content"),
181 [\ilObjLearningModuleGUI::class, \ilLMPageObjectGUI::class],
187 $lng->txt(
"cont_edit_title"),
192 $lng->txt(
"lm_insert_page_after"),
197 $lng->txt(
"lm_insert_page_before"),
200 if ($user->clipboardHasObjectsOfType(
"pg")) {
202 "insertPageClipAfter",
203 $lng->txt(
"lm_insert_page_clip_after"),
204 [EditSubObjectsGUI::class],
205 "insertPageClipAfter",
209 "insertPageClipBefore",
210 $lng->txt(
"lm_insert_page_clip_before"),
211 [EditSubObjectsGUI::class],
212 "insertPageClipBefore",
230 if ($this->type ===
"pg") {
233 $lng->txt(
"cont_de_activate")
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected string $title, protected int $lm_id, protected string $type, object $parent_gui, string $parent_cmd)
transformRow(array $data_row)
transform raw data array to table row data array
build(TableAdapterGUI $table)
textColumn(string $key, string $title, bool $sortable=false)
singleAction(string $action, string $title, bool $async=false)
standardAction(string $action, string $title)
singleRedirectAction(string $action, string $title, array $class_path, string $cmd="", string $id_param="", bool $async=false)
iconColumn(string $key, string $title, bool $sortable=false)
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)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...