40 string $a_parent_node_name
44 $this->
ctrl = $DIC->ctrl();
45 $this->
lng = $DIC->language();
46 $this->
access = $DIC->access();
47 $lng = $DIC->language();
49 $this->
setId(
"cont_iim_tr");
51 $this->parent_node_name = $a_parent_node_name;
52 $this->pc_media_object = $a_pc_media_object;
55 $this->areas = array();
56 foreach ($this->pc_media_object->getStandardAliasItem()->getMapAreas() as
$a) {
57 $this->area[
$a[
"Id"]] =
$a;
60 $this->ov_files = $this->mob->getFilesOfDirectory(
"overlays");
61 $this->ov_options = array(
"" =>
$lng->
txt(
"please_select"));
62 foreach ($this->ov_files as $of) {
63 $this->ov_options[$of] = $of;
65 $this->popups = $this->pc_media_object->getPopups();
66 $this->pop_options = array(
"" =>
$lng->
txt(
"please_select"));
67 foreach ($this->popups as $k => $p) {
68 $this->pop_options[$p[
"nr"]] = $p[
"title"];
71 $this->
setRowTemplate(
"tpl.iim_trigger_row.html",
"Services/COPage");
79 $this->
addColumn($this->
lng->txt(
"cont_coords"),
"",
"");
80 $this->
addColumn($this->
lng->txt(
"cont_overlay_image"),
"",
"");
81 $this->
addColumn($this->
lng->txt(
"cont_content_popup"),
"",
"");
93 if (count($data) > 0) {
100 $triggers = $this->pc_media_object->getTriggers();
106 protected function fillRow(array $a_set): void
113 if ($a_set[
"Overlay"] !=
"") {
114 $this->tpl->setCurrentBlock(
"cmd");
115 $this->tpl->setVariable(
"CMD_ID",
"ov_" .
$i);
116 $this->tpl->setVariable(
"HREF_CMD",
"#");
117 $this->tpl->setVariable(
"CMD_CLASS",
"ov_cmd");
118 $this->tpl->setVariable(
"TXT_CMD",
$lng->
txt(
"cont_edit_overlay_position"));
119 $this->tpl->parseCurrentBlock();
123 if ($a_set[
"PopupNr"] !=
"") {
124 $this->tpl->setCurrentBlock(
"cmd");
125 $this->tpl->setVariable(
"CMD_ID",
"pop_" .
$i);
126 $this->tpl->setVariable(
"HREF_CMD",
"#");
127 $this->tpl->setVariable(
"CMD_CLASS",
"pop_cmd");
128 $this->tpl->setVariable(
"TXT_CMD",
$lng->
txt(
"cont_edit_popup_position"));
129 $this->tpl->parseCurrentBlock();
133 $this->tpl->setCurrentBlock(
"coords");
134 $this->tpl->setVariable(
136 implode(
", ", explode(
",", $this->area[$a_set[
"Nr"]][
"Coords"]))
138 $this->tpl->parseCurrentBlock();
140 $this->tpl->setVariable(
142 $lng->
txt(
"cont_" . $this->area[$a_set[
"Nr"]][
"Shape"])
146 $this->tpl->setCurrentBlock(
"cmd");
147 $this->tpl->setVariable(
"CMD_ID",
"mark_" .
$i);
148 $this->tpl->setVariable(
"HREF_CMD",
"#");
149 $this->tpl->setVariable(
"CMD_CLASS",
"mark_cmd");
150 $this->tpl->setVariable(
"TXT_CMD",
$lng->
txt(
"cont_edit_marker_position"));
151 $this->tpl->parseCurrentBlock();
154 $this->tpl->setCurrentBlock(
"marker_pos");
155 $this->tpl->setVariable(
"VAR_MARK_POS",
"markpos[" .
$i .
"]");
156 $this->tpl->setVariable(
"ID_MARK_POS",
"markpos_" .
$i);
157 $this->tpl->setVariable(
"VAL_MARK_POS", $a_set[
"MarkerX"] .
"," . $a_set[
"MarkerY"]);
158 $this->tpl->setVariable(
"TXT_MLEFT",
$lng->
txt(
"cont_left"));
159 $this->tpl->setVariable(
"TXT_MTOP",
$lng->
txt(
"cont_top"));
160 $this->tpl->parseCurrentBlock();
162 $this->tpl->setVariable(
"TYPE",
$lng->
txt(
"cont_marker"));
165 $this->tpl->setVariable(
169 $this->tpl->setVariable(
"VAR_NAME",
"title[" .
$i .
"]");
170 $this->tpl->setVariable(
"VAL_NAME", $a_set[
"Title"]);
173 $this->tpl->setVariable(
"VAR_POS",
"ovpos[" .
$i .
"]");
174 $this->tpl->setVariable(
"ID_OV_POS",
"ovpos_" .
$i);
175 $this->tpl->setVariable(
"ID_POP_POS",
"poppos_" .
$i);
176 $this->tpl->setVariable(
"VAR_POP_POS",
"poppos[" .
$i .
"]");
177 $this->tpl->setVariable(
"VAR_POP_SIZE",
"popsize[" .
$i .
"]");
178 $this->tpl->setVariable(
"VAL_POS", $a_set[
"OverlayX"] .
"," . $a_set[
"OverlayY"]);
179 $this->tpl->setVariable(
"VAL_POP_POS", $a_set[
"PopupX"] .
"," . $a_set[
"PopupY"]);
180 $this->tpl->setVariable(
"VAL_POP_SIZE", $a_set[
"PopupWidth"] .
"," . $a_set[
"PopupHeight"]);
181 $this->tpl->setVariable(
"TXT_IMG",
$lng->
txt(
"image"));
182 $this->tpl->setVariable(
"TXT_TITLE",
$lng->
txt(
"title"));
183 $this->tpl->setVariable(
"TXT_LEFT",
$lng->
txt(
"cont_left"));
184 $this->tpl->setVariable(
"TXT_TOP",
$lng->
txt(
"cont_top"));
185 $this->tpl->setVariable(
"TXT_WIDTH",
$lng->
txt(
"cont_width"));
186 $this->tpl->setVariable(
"TXT_HEIGHT",
$lng->
txt(
"cont_height"));
187 $this->tpl->setVariable(
191 $this->tpl->setVariable(
__construct(object $a_parent_obj, string $a_parent_cmd, ilPCInteractiveImage $a_pc_media_object, string $a_parent_node_name)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilPCInteractiveImage $pc_media_object
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addMultiCommand(string $a_cmd, string $a_text)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)