ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
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 ()
 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 = []
 
 $image_path = ""
 
 $image_path_web = ""
 
 $line_color = ""
 
 $pointsUncheckedFieldEnabled = false
 
ilTestLegacyFormsHelper $forms_helper
 
GlyphFactory $glyph_factory
 
ButtonFactory $button_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 32 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 52 of file class.ilImagemapFileInputGUI.php.

53 {
54 parent::__construct($a_title, $a_postvar);
55
56 global $DIC;
57
58 $this->forms_helper = new ilTestLegacyFormsHelper();
59 $this->glyph_factory = $DIC->ui()->factory()->symbol()->glyph();
60 $this->button_factory = $DIC->ui()->factory()->button();
61 $this->renderer = $DIC->ui()->renderer();
62 }
renderer()
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ 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 180 of file class.ilImagemapFileInputGUI.php.

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

References ilFileInputGUI\$filename, ilFormPropertyGUI\$lng, 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 139 of file class.ilImagemapFileInputGUI.php.

139 : array
140 {
141 return $this->areas;
142 }

References $areas.

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

+ Here is the caller graph for this function:

◆ getImagePath()

ilImagemapFileInputGUI::getImagePath ( )

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

89 : string
90 {
91 return $this->image_path;
92 }

References $image_path.

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

+ Here is the caller graph for this function:

◆ getImagePathWeb()

ilImagemapFileInputGUI::getImagePathWeb ( )

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

99 : string
100 {
102 }

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 164 of file class.ilImagemapFileInputGUI.php.

164 : array
165 {
166 return parent::getInput();
167 }

◆ getLineColor()

ilImagemapFileInputGUI::getLineColor ( )

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

79 : string
80 {
81 return $this->line_color;
82 }

References $line_color.

◆ getPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::getPointsUncheckedFieldEnabled ( )

◆ getPostBody()

ilImagemapFileInputGUI::getPostBody ( )
private

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

169 : array
170 {
171 $val = $this->arrayArray($this->getPostVar());
173 return $val;
174 }
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 287 of file class.ilImagemapFileInputGUI.php.

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

References $counter, ilFormPropertyGUI\$lng, ilImageFileInputGUI\getAlt(), getAreas(), ilFormPropertyGUI\getFieldId(), ilImageFileInputGUI\getImage(), getImagePath(), getImagePathWeb(), getPointsUncheckedFieldEnabled(), ilFormPropertyGUI\getPostVar(), ilFileInputGUI\getValue(), ILIAS\Repository\lng(), ilFileInputGUI\outputSuffixes(), ilTemplate\parseCurrentBlock(), renderer(), 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 74 of file class.ilImagemapFileInputGUI.php.

74 : void
75 {
76 $this->areas = $a_areas;
77 }

◆ setAreasByArray()

ilImagemapFileInputGUI::setAreasByArray (   $a_areas)

Reimplemented in ilImagemapCorrectionsInputGUI.

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

109 : void
110 {
111 if (is_array($a_areas['name'])) {
112 $this->areas = [];
113 foreach ($a_areas['name'] as $idx => $name) {
114 if ($this->getPointsUncheckedFieldEnabled() && isset($a_areas['points_unchecked'])) {
115 $pointsUnchecked = $a_areas['points_unchecked'][$idx];
116 } else {
117 $pointsUnchecked = 0.0;
118 }
119
120 array_push($this->areas, new ASS_AnswerImagemap(
121 $name,
122 $a_areas['points'][$idx],
123 $idx,
124 $a_areas['coords'][$idx],
125 $a_areas['shape'][$idx],
126 -1,
127 $pointsUnchecked
128 ));
129
130 $imagemap = new ASS_AnswerImagemap($name, $a_areas['points'][$idx], $idx, 0, -1);
131 $imagemap->setCoords($a_areas['coords'][$idx]);
132 $imagemap->setArea($a_areas['shape'][$idx]);
133 $imagemap->setPointsUnchecked($pointsUnchecked);
134 array_push($this->areas, $imagemap);
135 }
136 }
137 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References 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 94 of file class.ilImagemapFileInputGUI.php.

94 : void
95 {
96 $this->image_path = $a_path;
97 }

◆ setImagePathWeb()

ilImagemapFileInputGUI::setImagePathWeb (   $a_path_web)

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

104 : void
105 {
106 $this->image_path_web = $a_path_web;
107 }

◆ setLineColor()

ilImagemapFileInputGUI::setLineColor (   $a_color)

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

84 : void
85 {
86 $this->line_color = $a_color;
87 }

◆ setPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::setPointsUncheckedFieldEnabled (   $pointsUncheckedFieldEnabled)

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

64 : void
65 {
66 $this->pointsUncheckedFieldEnabled = (bool) $pointsUncheckedFieldEnabled;
67 }

References $pointsUncheckedFieldEnabled.

◆ setValue()

ilImagemapFileInputGUI::setValue (   $a_value)

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

159 : void
160 {
161 parent::setValue($a_value);
162 }

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 149 of file class.ilImagemapFileInputGUI.php.

149 : void
150 {
151 if (isset($a_value[$this->getPostVar() . '_name'])) {
152 $this->setValue($a_values[$this->getPostVar() . '_name']);
153 }
154 if (isset($a_value[$this->getPostVar()]['coords'])) {
155 $this->setAreasByArray($a_values[$this->getPostVar()]['coords']);
156 }
157 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $areas

ilImagemapFileInputGUI::$areas = []
protected

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

Referenced by getAreas().

◆ $button_factory

ButtonFactory ilImagemapFileInputGUI::$button_factory
protected

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

◆ $forms_helper

ilTestLegacyFormsHelper ilImagemapFileInputGUI::$forms_helper
protected

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

◆ $glyph_factory

GlyphFactory ilImagemapFileInputGUI::$glyph_factory
protected

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

◆ $image_path

ilImagemapFileInputGUI::$image_path = ""
protected

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

Referenced by getImagePath().

◆ $image_path_web

ilImagemapFileInputGUI::$image_path_web = ""
protected

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

Referenced by getImagePathWeb().

◆ $line_color

ilImagemapFileInputGUI::$line_color = ""
protected

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

Referenced by getLineColor().

◆ $pointsUncheckedFieldEnabled

ilImagemapFileInputGUI::$pointsUncheckedFieldEnabled = false
protected

◆ $renderer

Renderer ilImagemapFileInputGUI::$renderer
protected

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


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