ILIAS  release_8 Revision v8.24
ilImagemapFileInputGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilImagemapFileInputGUI:
+ Collaboration diagram for ilImagemapFileInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setPointsUncheckedFieldEnabled ($pointsUncheckedFieldEnabled)
 
 getPointsUncheckedFieldEnabled ()
 
 setAreas ($a_areas)
 
 getLineColor ()
 
 setLineColor ($a_color)
 
 getImagePath ()
 
 setImagePath ($a_path)
 
 getImagePathWeb ()
 
 setImagePathWeb ($a_path_web)
 
 setAreasByArray ($a_areas)
 
 getAreas ()
 
 setValueByArray (array $a_values)
 Set value by array. More...
 
 setValue ($a_value)
 
 getInput ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 insert (ilTemplate $a_tpl)
 Insert property html. More...
 
- Public Member Functions inherited from ilImageFileInputGUI
 __construct (string $a_title="", string $a_postvar="")
 
 setAllowDeletion (bool $a_val)
 
 getALlowDeletion ()
 
 setAllowCapture (bool $a_val)
 
 getAllowCapture ()
 
 setUseCache (bool $a_cache)
 Set cache. More...
 
 getUseCache ()
 
 setImage (string $a_image)
 
 getImage ()
 
 setAlt (string $a_alt)
 
 getAlt ()
 
 insert (ilTemplate $a_tpl)
 
 getDeletionFlag ()
 
- Public Member Functions inherited from ilFileInputGUI
 __construct (string $a_title="", string $a_postvar="")
 
 setValueByArray (array $a_values)
 
 setValue (string $a_value)
 Set Value. More...
 
 getValue ()
 
 setSize (int $a_size)
 
 getSize ()
 
 setFilename (string $a_val)
 
 getFilename ()
 
 setSuffixes (array $a_suffixes)
 
 getSuffixes ()
 
 setForbiddenSuffixes (array $a_suffixes)
 
 getForbiddenSuffixes ()
 
 setPending (string $a_val)
 
 getPending ()
 
 enableFileNameSelection (string $a_post_var)
 
 isFileNameSelectionEnabled ()
 
 getFileNamePostVar ()
 
 setAllowDeletion (bool $a_val)
 
 getALlowDeletion ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
 render (string $a_mode="")
 
 insert (ilTemplate $a_tpl)
 
 getDeletionFlag ()
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem (ilFormPropertyGUI $a_item)
 
 getSubItems ()
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct (string $a_title="", string $a_postvar="")
 
 executeCommand ()
 
 getType ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setPostVar (string $a_postvar)
 
 getPostVar ()
 
 getFieldId ()
 
 setInfo (string $a_info)
 
 getInfo ()
 
 setAlert (string $a_alert)
 
 getAlert ()
 
 setRequired (bool $a_required)
 
 getRequired ()
 
 setDisabled (bool $a_disabled)
 
 getDisabled ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm (ilPropertyFormGUI $a_parentform)
 
 getParentForm ()
 
 setParent (ilFormPropertyGUI $a_val)
 
 getParent ()
 
 getSubForm ()
 
 hideSubForm ()
 
 setHiddenTitle (string $a_val)
 
 getHiddenTitle ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
 serializeData ()
 
 unserializeData (string $a_data)
 
 setParentTable ($a_val)
 Set parent table. More...
 
 getParentTable ()
 Get parent table. More...
 
 writeToSession ()
 
 clearFromSession ()
 
 readFromSession ()
 
 getHiddenTag (string $a_post_var, string $a_value)
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 getMulti ()
 
 setMultiValues (array $a_values)
 
 getMultiValues ()
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback (string $a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 
 setRequestParam (string $key, $val)
 This writes the request (aka post) values. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Protected Attributes

 $areas = array()
 
 $image_path = ""
 
 $image_path_web = ""
 
 $line_color = ""
 
 $pointsUncheckedFieldEnabled = false
 
- Protected Attributes inherited from ilImageFileInputGUI
ilGlobalTemplateInterface $tpl
 
bool $cache = false
 
string $alt = ""
 
string $image = ""
 
bool $allow_capture = false
 
- Protected Attributes inherited from ilFileInputGUI
int $size = 40
 
string $pending = ""
 
bool $allow_deletion = false
 
bool $filename_selection = false
 
array $forbidden_suffixes = []
 
array $suffixes = []
 
string $value = ""
 
ILIAS FileUpload FileUpload $upload_service
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
array $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
array $set_params = []
 
ilTable2GUI $parent_table = null
 
ilFormPropertyGUI $parent_gui = null
 
ilCtrl $ctrl
 
ilLanguage $lng
 
string $type = ""
 
string $title = ""
 
string $postvar = ""
 
string $info = ""
 
string $alert = ""
 
bool $required = false
 
ilPropertyFormGUI $parentform = null
 
string $hidden_title = ""
 
bool $multi = false
 
bool $multi_sortable = false
 
bool $multi_addremove = true
 
array $multi_values = []
 
RequestInterface $request
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
bool $disabled = false
 
ilGlobalTemplateInterface $global_tpl = null
 

Private Member Functions

 getPostBody ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Member Functions inherited from ilFileInputGUI
 outputSuffixes (ilTemplate $a_tpl, string $a_block="allowed_suffixes")
 
 getMaxFileSizeString ()
 
 getMaxFileUploads ()
 Get number of maximum file uploads as declared in php.ini. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType (string $a_type)
 
 checkParentFormTable ()
 
 getSessionKey ()
 
 getMultiIconsHTML ()
 
 int ($key)
 
 intArray ($key)
 
 str ($key)
 
 raw ($key)
 
 strArray ($key)
 
 arrayArray ($key)
 
 isRequestParamArray (string $key)
 
 getRequestParam (string $key, Refinery\Transformation $t)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning This class represents an image map file property in a property form.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

Definition at line 26 of file class.ilImagemapFileInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilImagemapFileInputGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Definition at line 41 of file class.ilImagemapFileInputGUI.php.

42 {
43 parent::__construct($a_title, $a_postvar);
44 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilImagemapFileInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilFileInputGUI.

Reimplemented in ilImagemapCorrectionsInputGUI.

Definition at line 162 of file class.ilImagemapFileInputGUI.php.

162 : bool
163 {
165
166 // remove trailing '/'
167 $_FILES[$this->getPostVar()]["name"] = rtrim($_FILES[$this->getPostVar()]["name"], '/');
168
169 $filename = $_FILES[$this->getPostVar()]["name"];
170 $filename_arr = pathinfo($_FILES[$this->getPostVar()]["name"]);
171 $suffix = $filename_arr["extension"] ?? '';
172 $mimetype = $_FILES[$this->getPostVar()]["type"];
173 $size_bytes = $_FILES[$this->getPostVar()]["size"];
174 $temp_name = $_FILES[$this->getPostVar()]["tmp_name"];
175 $error = $_FILES[$this->getPostVar()]["error"];
176
177 // error handling
178 if ($error > 0) {
179 switch ($error) {
180 case UPLOAD_ERR_FORM_SIZE:
181 case UPLOAD_ERR_INI_SIZE:
182 $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
183 return false;
184 break;
185
186 case UPLOAD_ERR_PARTIAL:
187 $this->setAlert($lng->txt("form_msg_file_partially_uploaded"));
188 return false;
189 break;
190
191 case UPLOAD_ERR_NO_FILE:
192 if ($this->getRequired()) {
193 if (!strlen($this->getValue())) {
194 $this->setAlert($lng->txt("form_msg_file_no_upload"));
195 return false;
196 }
197 }
198 break;
199
200 case UPLOAD_ERR_NO_TMP_DIR:
201 $this->setAlert($lng->txt("form_msg_file_missing_tmp_dir"));
202 return false;
203 break;
204
205 case UPLOAD_ERR_CANT_WRITE:
206 $this->setAlert($lng->txt("form_msg_file_cannot_write_to_disk"));
207 return false;
208 break;
209
210 case UPLOAD_ERR_EXTENSION:
211 $this->setAlert($lng->txt("form_msg_file_upload_stopped_ext"));
212 return false;
213 break;
214 }
215 }
216
217 // check suffixes
218 if ($_FILES[$this->getPostVar()]["tmp_name"] != "" &&
219 is_array($this->getSuffixes())) {
220 if (!in_array(strtolower($suffix), $this->getSuffixes())) {
221 $this->setAlert($lng->txt("form_msg_file_wrong_file_type"));
222 return false;
223 }
224 }
225
226 // virus handling
227 if ($_FILES[$this->getPostVar()]["tmp_name"] != "") {
228 $vir = ilVirusScanner::virusHandling($temp_name, $filename);
229 if ($vir[0] == false) {
230 $this->setAlert($lng->txt("form_msg_file_virus_found") . "<br />" . $vir[1]);
231 return false;
232 }
233 }
234
235 $post_body = $this->getPostBody();
236
237 $max = 0;
238 if (isset($post_body['coords']) && is_array($post_body['coords']['name'])) {
239 foreach ($post_body['coords']['name'] as $idx => $name) {
240 if ($this->getRequired() && (
241 !isset($post_body['coords']['points'][$idx]) ||
242 $post_body['coords']['points'][$idx] == ''
243 )) {
244 $this->setAlert($lng->txt('form_msg_area_missing_points'));
245 return false;
246 }
247
248 if ((!is_numeric($post_body['coords']['points'][$idx]))) {
249 $this->setAlert($lng->txt('form_msg_numeric_value_required'));
250 return false;
251 }
252
253 if ($post_body['coords']['points'][$idx] > 0) {
254 $max = $post_body['coords']['points'][$idx];
255 }
256 }
257 }
258
259 if ($max == 0 && (!$filename) && !$_FILES['imagemapfile']['tmp_name']) {
260 $this->setAlert($lng->txt("enter_enough_positive_points"));
261 return false;
262 }
263 return true;
264 }
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...
static virusHandling(string $a_file, string $a_orig_name='', bool $a_clean=true)
if($format !==null) $name
Definition: metadata.php:247

References ilFileInputGUI\$filename, ilFormPropertyGUI\$lng, $name, getPostBody(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), ilFileInputGUI\getSuffixes(), ilFileInputGUI\getValue(), ilFormPropertyGUI\setAlert(), ilLanguage\txt(), and ilVirusScanner\virusHandling().

+ Here is the call graph for this function:

◆ getAreas()

ilImagemapFileInputGUI::getAreas ( )

Definition at line 121 of file class.ilImagemapFileInputGUI.php.

121 : array
122 {
123 return $this->areas;
124 }

References $areas.

Referenced by ilImagemapCorrectionsInputGUI\insert(), and insert().

+ Here is the caller graph for this function:

◆ getImagePath()

ilImagemapFileInputGUI::getImagePath ( )

Definition at line 71 of file class.ilImagemapFileInputGUI.php.

71 : string
72 {
73 return $this->image_path;
74 }

References $image_path.

Referenced by ilImagemapCorrectionsInputGUI\insert(), and insert().

+ Here is the caller graph for this function:

◆ getImagePathWeb()

ilImagemapFileInputGUI::getImagePathWeb ( )

Definition at line 81 of file class.ilImagemapFileInputGUI.php.

81 : string
82 {
84 }

References $image_path_web.

Referenced by ilImagemapCorrectionsInputGUI\insert(), and insert().

+ Here is the caller graph for this function:

◆ getInput()

ilImagemapFileInputGUI::getInput ( )

Reimplemented from ilFileInputGUI.

Definition at line 146 of file class.ilImagemapFileInputGUI.php.

146 : array
147 {
148 return parent::getInput();
149 }

◆ getLineColor()

ilImagemapFileInputGUI::getLineColor ( )

Definition at line 61 of file class.ilImagemapFileInputGUI.php.

61 : string
62 {
63 return $this->line_color;
64 }

References $line_color.

◆ getPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::getPointsUncheckedFieldEnabled ( )

◆ getPostBody()

ilImagemapFileInputGUI::getPostBody ( )
private

Definition at line 151 of file class.ilImagemapFileInputGUI.php.

151 : array
152 {
153 $val = $this->arrayArray($this->getPostVar());
155 return $val;
156 }
static stripSlashesRecursive($a_data, bool $a_strip_html=true, string $a_allow="")

References ilFormPropertyGUI\arrayArray(), ilFormPropertyGUI\getPostVar(), and ilArrayUtil\stripSlashesRecursive().

Referenced by checkInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

ilImagemapFileInputGUI::insert ( ilTemplate  $a_tpl)

Insert property html.

Reimplemented from ilImageFileInputGUI.

Reimplemented in ilImagemapCorrectionsInputGUI.

Definition at line 269 of file class.ilImagemapFileInputGUI.php.

269 : void
270 {
272
273 $template = new ilTemplate("tpl.prop_imagemap_file.html", true, true, "Modules/TestQuestionPool");
274
275 $this->outputSuffixes($template, "allowed_image_suffixes");
276
277 if ($this->getImage() != "") {
278 if (strlen($this->getValue())) {
279 $template->setCurrentBlock("has_value");
280 $template->setVariable("TEXT_IMAGE_NAME", $this->getValue());
281 $template->setVariable("POST_VAR_D", $this->getPostVar());
282 $template->parseCurrentBlock();
283 }
284 $template->setCurrentBlock("image");
285 if (count($this->getAreas())) {
286 $preview = new ilImagemapPreview($this->getImagePath() . $this->getValue());
287 foreach ($this->getAreas() as $index => $area) {
288 $preview->addArea($index, $area->getArea(), $area->getCoords(), $area->getAnswertext(), "", "", true, $this->getLineColor());
289 }
290 $preview->createPreview();
291 $imagepath = $this->getImagePathWeb() . $preview->getPreviewFilename($this->getImagePath(), $this->getValue()) . "?img=" . time();
292 $template->setVariable("SRC_IMAGE", $imagepath);
293 } else {
294 $template->setVariable("SRC_IMAGE", $this->getImage());
295 }
296 $template->setVariable("ALT_IMAGE", $this->getAlt());
297 $template->setVariable("POST_VAR_D", $this->getPostVar());
298 $template->setVariable(
299 "TXT_DELETE_EXISTING",
300 $lng->txt("delete_existing_file")
301 );
302 $template->setVariable("TEXT_ADD_RECT", $lng->txt('add_rect'));
303 $template->setVariable("TEXT_ADD_CIRCLE", $lng->txt('add_circle'));
304 $template->setVariable("TEXT_ADD_POLY", $lng->txt('add_poly'));
305 $template->parseCurrentBlock();
306 }
307
308 if (is_array($this->getAreas()) && $this->getAreas()) {
309 $counter = 0;
310 foreach ($this->getAreas() as $area) {
311 if (strlen($area->getPoints())) {
312 $template->setCurrentBlock('area_points_value');
313 $template->setVariable('VALUE_POINTS', $area->getPoints());
314 $template->parseCurrentBlock();
315 }
316 if ($this->getPointsUncheckedFieldEnabled()) {
317 if (strlen($area->getPointsUnchecked())) {
318 $template->setCurrentBlock('area_points_unchecked_value');
319 $template->setVariable('VALUE_POINTS_UNCHECKED', $area->getPointsUnchecked());
320 $template->parseCurrentBlock();
321 }
322
323 $template->setCurrentBlock('area_points_unchecked_field');
324 $template->parseCurrentBlock();
325 }
326 if (strlen($area->getAnswertext())) {
327 $template->setCurrentBlock('area_name_value');
328 $template->setVariable('VALUE_NAME', htmlspecialchars($area->getAnswertext()));
329 $template->parseCurrentBlock();
330 }
331 $template->setCurrentBlock('row');
332 $template->setVariable('POST_VAR_R', $this->getPostVar());
333 $template->setVariable('TEXT_SHAPE', strtoupper($area->getArea()));
334 $template->setVariable('VALUE_SHAPE', $area->getArea());
335 $coords = preg_replace("/(\d+,\d+,)/", "\$1 ", $area->getCoords());
336 $template->setVariable('VALUE_COORDINATES', $area->getCoords());
337 $template->setVariable('TEXT_COORDINATES', $coords);
338 $template->setVariable('COUNTER', $counter);
339 $template->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
340 $template->parseCurrentBlock();
341 $counter++;
342 }
343 $template->setCurrentBlock("areas");
344 $template->setVariable("TEXT_NAME", $lng->txt("ass_imap_hint"));
345 if ($this->getPointsUncheckedFieldEnabled()) {
346 $template->setVariable("TEXT_POINTS", $lng->txt("points_checked"));
347
348 $template->setCurrentBlock('area_points_unchecked_head');
349 $template->setVariable("TEXT_POINTS_UNCHECKED", $lng->txt("points_unchecked"));
350 $template->parseCurrentBlock();
351 } else {
352 $template->setVariable("TEXT_POINTS", $lng->txt("points"));
353 }
354 $template->setVariable("TEXT_SHAPE", $lng->txt("shape"));
355 $template->setVariable("TEXT_COORDINATES", $lng->txt("coordinates"));
356 $template->setVariable("TEXT_COMMANDS", $lng->txt("actions"));
357 $template->parseCurrentBlock();
358 }
359
360 $template->setVariable("POST_VAR", $this->getPostVar());
361 $template->setVariable("ID", $this->getFieldId());
362 $template->setVariable("TXT_BROWSE", $lng->txt("select_file"));
363 $template->setVariable("TXT_MAX_SIZE", $lng->txt("file_notice") . " " .
364 $this->getMaxFileSizeString());
365
366 $a_tpl->setCurrentBlock("prop_generic");
367 $a_tpl->setVariable("PROP_GENERIC", $template->get());
368 $a_tpl->parseCurrentBlock();
369
370 $this->tpl->addJavascript("./Services/Form/js/ServiceFormWizardInput.js");
371 $this->tpl->addJavascript("./Modules/TestQuestionPool/templates/default/imagemap.js");
372 }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
outputSuffixes(ilTemplate $a_tpl, string $a_block="allowed_suffixes")
static get(string $a_glyph, string $a_text="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
$preview
Definition: imgupload.php:81
$index
Definition: metadata.php:145

References $index, ilFormPropertyGUI\$lng, $preview, ilGlyphGUI\get(), ilImageFileInputGUI\getAlt(), getAreas(), ilFormPropertyGUI\getFieldId(), ilImageFileInputGUI\getImage(), getImagePath(), getImagePathWeb(), getPointsUncheckedFieldEnabled(), ilFormPropertyGUI\getPostVar(), ilFileInputGUI\getValue(), ilFileInputGUI\outputSuffixes(), ilTemplate\parseCurrentBlock(), ilGlyphGUI\REMOVE, ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ setAreas()

ilImagemapFileInputGUI::setAreas (   $a_areas)

Definition at line 56 of file class.ilImagemapFileInputGUI.php.

56 : void
57 {
58 $this->areas = $a_areas;
59 }

◆ setAreasByArray()

ilImagemapFileInputGUI::setAreasByArray (   $a_areas)

Reimplemented in ilImagemapCorrectionsInputGUI.

Definition at line 91 of file class.ilImagemapFileInputGUI.php.

91 : void
92 {
93 if (is_array($a_areas['name'])) {
94 $this->areas = array();
95 foreach ($a_areas['name'] as $idx => $name) {
96 if ($this->getPointsUncheckedFieldEnabled() && isset($a_areas['points_unchecked'])) {
97 $pointsUnchecked = $a_areas['points_unchecked'][$idx];
98 } else {
99 $pointsUnchecked = 0.0;
100 }
101
102 array_push($this->areas, new ASS_AnswerImagemap(
103 $name,
104 $a_areas['points'][$idx],
105 $idx,
106 $a_areas['coords'][$idx],
107 $a_areas['shape'][$idx],
108 -1,
109 $pointsUnchecked
110 ));
111
112 $imagemap = new ASS_AnswerImagemap($name, $a_areas['points'][$idx], $idx, 0, -1);
113 $imagemap->setCoords($a_areas['coords'][$idx]);
114 $imagemap->setArea($a_areas['shape'][$idx]);
115 $imagemap->setPointsUnchecked($pointsUnchecked);
116 array_push($this->areas, $imagemap);
117 }
118 }
119 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $name, and getPointsUncheckedFieldEnabled().

Referenced by setValueByArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setImagePath()

ilImagemapFileInputGUI::setImagePath (   $a_path)

Definition at line 76 of file class.ilImagemapFileInputGUI.php.

76 : void
77 {
78 $this->image_path = $a_path;
79 }

◆ setImagePathWeb()

ilImagemapFileInputGUI::setImagePathWeb (   $a_path_web)

Definition at line 86 of file class.ilImagemapFileInputGUI.php.

86 : void
87 {
88 $this->image_path_web = $a_path_web;
89 }

◆ setLineColor()

ilImagemapFileInputGUI::setLineColor (   $a_color)

Definition at line 66 of file class.ilImagemapFileInputGUI.php.

66 : void
67 {
68 $this->line_color = $a_color;
69 }

◆ setPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::setPointsUncheckedFieldEnabled (   $pointsUncheckedFieldEnabled)

Definition at line 46 of file class.ilImagemapFileInputGUI.php.

46 : void
47 {
48 $this->pointsUncheckedFieldEnabled = (bool) $pointsUncheckedFieldEnabled;
49 }

References $pointsUncheckedFieldEnabled.

◆ setValue()

ilImagemapFileInputGUI::setValue (   $a_value)

Definition at line 141 of file class.ilImagemapFileInputGUI.php.

141 : void
142 {
143 parent::setValue($a_value);
144 }

Referenced by setValueByArray().

+ Here is the caller graph for this function:

◆ setValueByArray()

ilImagemapFileInputGUI::setValueByArray ( array  $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Reimplemented from ilFileInputGUI.

Reimplemented in ilImagemapCorrectionsInputGUI.

Definition at line 131 of file class.ilImagemapFileInputGUI.php.

131 : void
132 {
133 if (isset($a_value[$this->getPostVar() . '_name'])) {
134 $this->setValue($a_values[$this->getPostVar() . '_name']);
135 }
136 if (isset($a_value[$this->getPostVar()]['coords'])) {
137 $this->setAreasByArray($a_values[$this->getPostVar()]['coords']);
138 }
139 }

References ilFormPropertyGUI\getPostVar(), setAreasByArray(), and setValue().

+ Here is the call graph for this function:

Field Documentation

◆ $areas

ilImagemapFileInputGUI::$areas = array()
protected

Definition at line 28 of file class.ilImagemapFileInputGUI.php.

Referenced by getAreas().

◆ $image_path

ilImagemapFileInputGUI::$image_path = ""
protected

Definition at line 29 of file class.ilImagemapFileInputGUI.php.

Referenced by getImagePath().

◆ $image_path_web

ilImagemapFileInputGUI::$image_path_web = ""
protected

Definition at line 30 of file class.ilImagemapFileInputGUI.php.

Referenced by getImagePathWeb().

◆ $line_color

ilImagemapFileInputGUI::$line_color = ""
protected

Definition at line 31 of file class.ilImagemapFileInputGUI.php.

Referenced by getLineColor().

◆ $pointsUncheckedFieldEnabled

ilImagemapFileInputGUI::$pointsUncheckedFieldEnabled = false
protected

The documentation for this class was generated from the following file: