ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
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 33 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 53 of file class.ilImagemapFileInputGUI.php.

54 {
55 parent::__construct($a_title, $a_postvar);
56
57 global $DIC;
58
59 $this->forms_helper = new ilTestLegacyFormsHelper();
60 $this->glyph_factory = $DIC->ui()->factory()->symbol()->glyph();
61 $this->button_factory = $DIC->ui()->factory()->button();
62 $this->renderer = $DIC->ui()->renderer();
63 }
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 182 of file class.ilImagemapFileInputGUI.php.

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

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

References $areas.

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

+ Here is the caller graph for this function:

◆ getImagePath()

ilImagemapFileInputGUI::getImagePath ( )

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

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

References $image_path.

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

+ Here is the caller graph for this function:

◆ getImagePathWeb()

ilImagemapFileInputGUI::getImagePathWeb ( )

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

100 : string
101 {
103 }

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

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

◆ getLineColor()

ilImagemapFileInputGUI::getLineColor ( )

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

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

References $line_color.

◆ getPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::getPointsUncheckedFieldEnabled ( )

◆ getPostBody()

ilImagemapFileInputGUI::getPostBody ( )
private

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

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

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

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

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

◆ setAreasByArray()

ilImagemapFileInputGUI::setAreasByArray (   $a_areas)

Reimplemented in ilImagemapCorrectionsInputGUI.

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

110 : void
111 {
112 if (is_array($a_areas['name'])) {
113 $this->areas = [];
114 foreach ($a_areas['name'] as $idx => $name) {
115 if ($this->getPointsUncheckedFieldEnabled() && isset($a_areas['points_unchecked'])) {
116 $pointsUnchecked = $a_areas['points_unchecked'][$idx];
117 } else {
118 $pointsUnchecked = 0.0;
119 }
120
121 array_push($this->areas, new ASS_AnswerImagemap(
122 $name,
123 $a_areas['points'][$idx],
124 $idx,
125 $a_areas['coords'][$idx],
126 $a_areas['shape'][$idx],
127 -1,
128 $pointsUnchecked
129 ));
130
131 $imagemap = new ASS_AnswerImagemap($name, $a_areas['points'][$idx], $idx, 0, -1);
132 $imagemap->setCoords($a_areas['coords'][$idx]);
133 $imagemap->setArea($a_areas['shape'][$idx]);
134 $imagemap->setPointsUnchecked($pointsUnchecked);
135 array_push($this->areas, $imagemap);
136 }
137 }
138 }
Class for true/false or yes/no answers.

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

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

◆ setImagePathWeb()

ilImagemapFileInputGUI::setImagePathWeb (   $a_path_web)

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

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

◆ setLineColor()

ilImagemapFileInputGUI::setLineColor (   $a_color)

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

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

◆ setPointsUncheckedFieldEnabled()

ilImagemapFileInputGUI::setPointsUncheckedFieldEnabled (   $pointsUncheckedFieldEnabled)

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

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

References $pointsUncheckedFieldEnabled.

◆ setValue()

ilImagemapFileInputGUI::setValue (   $a_value)

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

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

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

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

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

+ Here is the call graph for this function:

Field Documentation

◆ $areas

ilImagemapFileInputGUI::$areas = []
protected

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

Referenced by getAreas().

◆ $button_factory

ButtonFactory ilImagemapFileInputGUI::$button_factory
protected

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

◆ $forms_helper

ilTestLegacyFormsHelper ilImagemapFileInputGUI::$forms_helper
protected

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

◆ $glyph_factory

GlyphFactory ilImagemapFileInputGUI::$glyph_factory
protected

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

◆ $image_path

ilImagemapFileInputGUI::$image_path = ""
protected

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

Referenced by getImagePath().

◆ $image_path_web

ilImagemapFileInputGUI::$image_path_web = ""
protected

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

Referenced by getImagePathWeb().

◆ $line_color

ilImagemapFileInputGUI::$line_color = ""
protected

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

Referenced by getLineColor().

◆ $pointsUncheckedFieldEnabled

ilImagemapFileInputGUI::$pointsUncheckedFieldEnabled = false
protected

◆ $renderer

Renderer ilImagemapFileInputGUI::$renderer
protected

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


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