ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilImagemapFileInputGUI Class Reference

This class represents an image map file property in a property form. 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 ()
 
 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)
 
- 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...
 

Protected Attributes

 $areas = array()
 
 $image_path = ""
 
 $image_path_web = ""
 
 $line_color = ""
 
 $pointsUncheckedFieldEnabled = false
 
GlyphFactory $glyph_factory
 
Renderer $renderer
 
- 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 = ""
 
FileUpload $upload_service
 
UploadLimitResolver $upload_limit
 
- 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
 symbol ()
 
 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 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 29 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 47 of file class.ilImagemapFileInputGUI.php.

References $DIC, and ILIAS\MetaData\Repository\Validation\Data\__construct().

48  {
49  parent::__construct($a_title, $a_postvar);
50 
51  global $DIC;
52  $this->glyph_factory = $DIC->ui()->factory()->symbol()->glyph();
53  $this->renderer = $DIC->ui()->renderer();
54  }
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
+ 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

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

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

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

◆ getAreas()

ilImagemapFileInputGUI::getAreas ( )

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

References $areas.

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

131  : array
132  {
133  return $this->areas;
134  }
+ Here is the caller graph for this function:

◆ getImagePath()

ilImagemapFileInputGUI::getImagePath ( )

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

References $image_path.

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

81  : string
82  {
83  return $this->image_path;
84  }
+ Here is the caller graph for this function:

◆ getImagePathWeb()

ilImagemapFileInputGUI::getImagePathWeb ( )

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

References $image_path_web.

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

91  : string
92  {
93  return $this->image_path_web;
94  }
+ Here is the caller graph for this function:

◆ getInput()

ilImagemapFileInputGUI::getInput ( )

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

156  : array
157  {
158  return parent::getInput();
159  }

◆ getLineColor()

ilImagemapFileInputGUI::getLineColor ( )

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

References $line_color.

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

71  : string
72  {
73  return $this->line_color;
74  }
+ Here is the caller graph for this function:

◆ getPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::getPointsUncheckedFieldEnabled ( )

◆ getPostBody()

ilImagemapFileInputGUI::getPostBody ( )
private

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

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

Referenced by checkInput().

161  : array
162  {
163  $val = $this->arrayArray($this->getPostVar());
165  return $val;
166  }
static stripSlashesRecursive($a_data, bool $a_strip_html=true, string $a_allow="")
+ 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.

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

References ilFormPropertyGUI\$lng, ilImageFileInputGUI\getAlt(), getAreas(), ilFormPropertyGUI\getFieldId(), ilImageFileInputGUI\getImage(), getImagePath(), getImagePathWeb(), getLineColor(), ilFileInputGUI\getMaxFileSizeString(), getPointsUncheckedFieldEnabled(), ilFormPropertyGUI\getPostVar(), ilFileInputGUI\getValue(), ILIAS\Repository\lng(), ilFileInputGUI\outputSuffixes(), ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilLanguage\txt().

279  : void
280  {
281  $lng = $this->lng;
282 
283  $template = new ilTemplate("tpl.prop_imagemap_file.html", true, true, "Modules/TestQuestionPool");
284 
285  $this->outputSuffixes($template, "allowed_image_suffixes");
286 
287  if ($this->getImage() != "") {
288  if (strlen($this->getValue())) {
289  $template->setCurrentBlock("has_value");
290  $template->setVariable("TEXT_IMAGE_NAME", $this->getValue());
291  $template->setVariable("POST_VAR_D", $this->getPostVar());
292  $template->parseCurrentBlock();
293  }
294  $template->setCurrentBlock("image");
295  if (count($this->getAreas())) {
296  $preview = new ilImagemapPreview($this->getImagePath() . $this->getValue());
297  foreach ($this->getAreas() as $index => $area) {
298  $preview->addArea($index, $area->getArea(), $area->getCoords(), $area->getAnswertext(), "", "", true, $this->getLineColor());
299  }
300  $preview->createPreview();
301  $imagepath = $this->getImagePathWeb() . $preview->getPreviewFilename($this->getImagePath(), $this->getValue()) . "?img=" . time();
302  $template->setVariable("SRC_IMAGE", $imagepath);
303  } else {
304  $template->setVariable("SRC_IMAGE", $this->getImage());
305  }
306  $template->setVariable("ALT_IMAGE", $this->getAlt());
307  $template->setVariable("POST_VAR_D", $this->getPostVar());
308  $template->setVariable(
309  "TXT_DELETE_EXISTING",
310  $lng->txt("delete_existing_file")
311  );
312  $template->setVariable("TEXT_ADD_RECT", $lng->txt('add_rect'));
313  $template->setVariable("TEXT_ADD_CIRCLE", $lng->txt('add_circle'));
314  $template->setVariable("TEXT_ADD_POLY", $lng->txt('add_poly'));
315  $template->parseCurrentBlock();
316  }
317 
318  if (is_array($this->getAreas()) && $this->getAreas()) {
319  $counter = 0;
320  foreach ($this->getAreas() as $area) {
321  if (strlen($area->getPoints())) {
322  $template->setCurrentBlock('area_points_value');
323  $template->setVariable('VALUE_POINTS', $area->getPoints());
324  $template->parseCurrentBlock();
325  }
326  if ($this->getPointsUncheckedFieldEnabled()) {
327  if (strlen($area->getPointsUnchecked())) {
328  $template->setCurrentBlock('area_points_unchecked_value');
329  $template->setVariable('VALUE_POINTS_UNCHECKED', $area->getPointsUnchecked());
330  $template->parseCurrentBlock();
331  }
332 
333  $template->setCurrentBlock('area_points_unchecked_field');
334  $template->parseCurrentBlock();
335  }
336  if (strlen($area->getAnswertext())) {
337  $template->setCurrentBlock('area_name_value');
338  $template->setVariable('VALUE_NAME', htmlspecialchars($area->getAnswertext()));
339  $template->parseCurrentBlock();
340  }
341  $template->setCurrentBlock('row');
342  $template->setVariable('POST_VAR_R', $this->getPostVar());
343  $template->setVariable('TEXT_SHAPE', strtoupper($area->getArea()));
344  $template->setVariable('VALUE_SHAPE', $area->getArea());
345  $coords = preg_replace("/(\d+,\d+,)/", "\$1 ", $area->getCoords());
346  $template->setVariable('VALUE_COORDINATES', $area->getCoords());
347  $template->setVariable('TEXT_COORDINATES', $coords);
348  $template->setVariable("REMOVE_BUTTON", $this->renderer->render(
349  $this->glyph_factory->remove()->withAction('#')
350  ));
351  $template->parseCurrentBlock();
352  $counter++;
353  }
354  $template->setCurrentBlock("areas");
355  $template->setVariable("TEXT_NAME", $lng->txt("ass_imap_hint"));
356  if ($this->getPointsUncheckedFieldEnabled()) {
357  $template->setVariable("TEXT_POINTS", $lng->txt("points_checked"));
358 
359  $template->setCurrentBlock('area_points_unchecked_head');
360  $template->setVariable("TEXT_POINTS_UNCHECKED", $lng->txt("points_unchecked"));
361  $template->parseCurrentBlock();
362  } else {
363  $template->setVariable("TEXT_POINTS", $lng->txt("points"));
364  }
365  $template->setVariable("TEXT_SHAPE", $lng->txt("shape"));
366  $template->setVariable("TEXT_COORDINATES", $lng->txt("coordinates"));
367  $template->setVariable("TEXT_COMMANDS", $lng->txt("actions"));
368  $template->parseCurrentBlock();
369  }
370 
371  $template->setVariable("POST_VAR", $this->getPostVar());
372  $template->setVariable("ID", $this->getFieldId());
373  $template->setVariable("TXT_BROWSE", $lng->txt("select_file"));
374  $template->setVariable('MAX_SIZE_WARNING', $this->lng->txt('form_msg_file_size_exceeds'));
375  $template->setVariable('MAX_SIZE', $this->upload_limit->getPhpUploadLimitInBytes());
376  $template->setVariable("TXT_MAX_SIZE", $lng->txt("file_notice") . " " .
377  $this->getMaxFileSizeString());
378 
379  $a_tpl->setCurrentBlock("prop_generic");
380  $a_tpl->setVariable("PROP_GENERIC", $template->get());
381  $a_tpl->parseCurrentBlock();
382 
383  $this->tpl->addJavascript("./Modules/TestQuestionPool/templates/default/answerwizardinput.js");
384  $this->tpl->addJavascript("./Modules/TestQuestionPool/templates/default/imagemap.js");
385  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
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...
outputSuffixes(ilTemplate $a_tpl, string $a_block="allowed_suffixes")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:546
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ setAreas()

ilImagemapFileInputGUI::setAreas (   $a_areas)

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

66  : void
67  {
68  $this->areas = $a_areas;
69  }

◆ setAreasByArray()

ilImagemapFileInputGUI::setAreasByArray (   $a_areas)

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

References getPointsUncheckedFieldEnabled().

Referenced by setValueByArray().

101  : void
102  {
103  if (is_array($a_areas['name'])) {
104  $this->areas = array();
105  foreach ($a_areas['name'] as $idx => $name) {
106  if ($this->getPointsUncheckedFieldEnabled() && isset($a_areas['points_unchecked'])) {
107  $pointsUnchecked = $a_areas['points_unchecked'][$idx];
108  } else {
109  $pointsUnchecked = 0.0;
110  }
111 
112  array_push($this->areas, new ASS_AnswerImagemap(
113  $name,
114  $a_areas['points'][$idx],
115  $idx,
116  $a_areas['coords'][$idx],
117  $a_areas['shape'][$idx],
118  -1,
119  $pointsUnchecked
120  ));
121 
122  $imagemap = new ASS_AnswerImagemap($name, $a_areas['points'][$idx], $idx, 0, -1);
123  $imagemap->setCoords($a_areas['coords'][$idx]);
124  $imagemap->setArea($a_areas['shape'][$idx]);
125  $imagemap->setPointsUnchecked($pointsUnchecked);
126  array_push($this->areas, $imagemap);
127  }
128  }
129  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setImagePath()

ilImagemapFileInputGUI::setImagePath (   $a_path)

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

86  : void
87  {
88  $this->image_path = $a_path;
89  }

◆ setImagePathWeb()

ilImagemapFileInputGUI::setImagePathWeb (   $a_path_web)

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

96  : void
97  {
98  $this->image_path_web = $a_path_web;
99  }

◆ setLineColor()

ilImagemapFileInputGUI::setLineColor (   $a_color)

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

76  : void
77  {
78  $this->line_color = $a_color;
79  }

◆ setPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::setPointsUncheckedFieldEnabled (   $pointsUncheckedFieldEnabled)

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

References $pointsUncheckedFieldEnabled.

Referenced by assImagemapQuestionGUI\populateCorrectionsFormProperties(), and assImagemapQuestionGUI\populateQuestionSpecificFormPart().

56  : void
57  {
58  $this->pointsUncheckedFieldEnabled = (bool) $pointsUncheckedFieldEnabled;
59  }
+ Here is the caller graph for this function:

◆ setValue()

ilImagemapFileInputGUI::setValue (   $a_value)

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

Referenced by setValueByArray().

151  : void
152  {
153  parent::setValue($a_value);
154  }
+ Here is the caller graph for this function:

◆ setValueByArray()

ilImagemapFileInputGUI::setValueByArray ( array  $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

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

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

141  : void
142  {
143  if (isset($a_value[$this->getPostVar() . '_name'])) {
144  $this->setValue($a_values[$this->getPostVar() . '_name']);
145  }
146  if (isset($a_value[$this->getPostVar()]['coords'])) {
147  $this->setAreasByArray($a_values[$this->getPostVar()]['coords']);
148  }
149  }
+ Here is the call graph for this function:

Field Documentation

◆ $areas

ilImagemapFileInputGUI::$areas = array()
protected

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

Referenced by getAreas().

◆ $glyph_factory

GlyphFactory ilImagemapFileInputGUI::$glyph_factory
protected

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

◆ $image_path

ilImagemapFileInputGUI::$image_path = ""
protected

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

Referenced by getImagePath().

◆ $image_path_web

ilImagemapFileInputGUI::$image_path_web = ""
protected

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

Referenced by getImagePathWeb().

◆ $line_color

ilImagemapFileInputGUI::$line_color = ""
protected

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

Referenced by getLineColor().

◆ $pointsUncheckedFieldEnabled

ilImagemapFileInputGUI::$pointsUncheckedFieldEnabled = false
protected

◆ $renderer

Renderer ilImagemapFileInputGUI::$renderer
protected

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


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