ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 = []
 
 $image_path = ""
 
 $image_path_web = ""
 
 $line_color = ""
 
 $pointsUncheckedFieldEnabled = false
 
ilTestLegacyFormsHelper $forms_helper
 
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 31 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 50 of file class.ilImagemapFileInputGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and renderer().

51  {
52  parent::__construct($a_title, $a_postvar);
53 
54  global $DIC;
55 
56  $this->forms_helper = new ilTestLegacyFormsHelper();
57  $this->glyph_factory = $DIC->ui()->factory()->symbol()->glyph();
58  $this->renderer = $DIC->ui()->renderer();
59  }
renderer()
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ 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 177 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().

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

References $areas.

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

136  : array
137  {
138  return $this->areas;
139  }
+ Here is the caller graph for this function:

◆ getImagePath()

ilImagemapFileInputGUI::getImagePath ( )

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

References $image_path.

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

86  : string
87  {
88  return $this->image_path;
89  }
+ Here is the caller graph for this function:

◆ getImagePathWeb()

ilImagemapFileInputGUI::getImagePathWeb ( )

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

References $image_path_web.

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

96  : string
97  {
98  return $this->image_path_web;
99  }
+ Here is the caller graph for this function:

◆ getInput()

ilImagemapFileInputGUI::getInput ( )

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

161  : array
162  {
163  return parent::getInput();
164  }

◆ getLineColor()

ilImagemapFileInputGUI::getLineColor ( )

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

References $line_color.

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

76  : string
77  {
78  return $this->line_color;
79  }
+ Here is the caller graph for this function:

◆ getPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::getPointsUncheckedFieldEnabled ( )

◆ getPostBody()

ilImagemapFileInputGUI::getPostBody ( )
private

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

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

Referenced by checkInput().

166  : array
167  {
168  $val = $this->arrayArray($this->getPostVar());
170  return $val;
171  }
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 284 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(), renderer(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilLanguage\txt().

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

◆ setAreas()

ilImagemapFileInputGUI::setAreas (   $a_areas)

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

71  : void
72  {
73  $this->areas = $a_areas;
74  }

◆ setAreasByArray()

ilImagemapFileInputGUI::setAreasByArray (   $a_areas)

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

References getPointsUncheckedFieldEnabled().

Referenced by setValueByArray().

106  : void
107  {
108  if (is_array($a_areas['name'])) {
109  $this->areas = [];
110  foreach ($a_areas['name'] as $idx => $name) {
111  if ($this->getPointsUncheckedFieldEnabled() && isset($a_areas['points_unchecked'])) {
112  $pointsUnchecked = $a_areas['points_unchecked'][$idx];
113  } else {
114  $pointsUnchecked = 0.0;
115  }
116 
117  array_push($this->areas, new ASS_AnswerImagemap(
118  $name,
119  $a_areas['points'][$idx],
120  $idx,
121  $a_areas['coords'][$idx],
122  $a_areas['shape'][$idx],
123  -1,
124  $pointsUnchecked
125  ));
126 
127  $imagemap = new ASS_AnswerImagemap($name, $a_areas['points'][$idx], $idx, 0, -1);
128  $imagemap->setCoords($a_areas['coords'][$idx]);
129  $imagemap->setArea($a_areas['shape'][$idx]);
130  $imagemap->setPointsUnchecked($pointsUnchecked);
131  array_push($this->areas, $imagemap);
132  }
133  }
134  }
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 91 of file class.ilImagemapFileInputGUI.php.

91  : void
92  {
93  $this->image_path = $a_path;
94  }

◆ setImagePathWeb()

ilImagemapFileInputGUI::setImagePathWeb (   $a_path_web)

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

101  : void
102  {
103  $this->image_path_web = $a_path_web;
104  }

◆ setLineColor()

ilImagemapFileInputGUI::setLineColor (   $a_color)

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

81  : void
82  {
83  $this->line_color = $a_color;
84  }

◆ setPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::setPointsUncheckedFieldEnabled (   $pointsUncheckedFieldEnabled)

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

References $pointsUncheckedFieldEnabled.

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

61  : void
62  {
63  $this->pointsUncheckedFieldEnabled = (bool) $pointsUncheckedFieldEnabled;
64  }
+ Here is the caller graph for this function:

◆ setValue()

ilImagemapFileInputGUI::setValue (   $a_value)

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

Referenced by setValueByArray().

156  : void
157  {
158  parent::setValue($a_value);
159  }
+ 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 146 of file class.ilImagemapFileInputGUI.php.

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

146  : void
147  {
148  if (isset($a_value[$this->getPostVar() . '_name'])) {
149  $this->setValue($a_values[$this->getPostVar() . '_name']);
150  }
151  if (isset($a_value[$this->getPostVar()]['coords'])) {
152  $this->setAreasByArray($a_values[$this->getPostVar()]['coords']);
153  }
154  }
+ Here is the call graph for this function:

Field Documentation

◆ $areas

ilImagemapFileInputGUI::$areas = []
protected

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

Referenced by getAreas().

◆ $forms_helper

ilTestLegacyFormsHelper ilImagemapFileInputGUI::$forms_helper
protected

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

◆ $glyph_factory

GlyphFactory ilImagemapFileInputGUI::$glyph_factory
protected

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

◆ $image_path

ilImagemapFileInputGUI::$image_path = ""
protected

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

Referenced by getImagePath().

◆ $image_path_web

ilImagemapFileInputGUI::$image_path_web = ""
protected

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

Referenced by getImagePathWeb().

◆ $line_color

ilImagemapFileInputGUI::$line_color = ""
protected

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

Referenced by getLineColor().

◆ $pointsUncheckedFieldEnabled

ilImagemapFileInputGUI::$pointsUncheckedFieldEnabled = false
protected

◆ $renderer

Renderer ilImagemapFileInputGUI::$renderer
protected

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


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