ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.MapEditorSessionRepository.php
Go to the documentation of this file.
1 <?php
2 
19 namespace ILIAS\COPage\PC;
20 
27 {
28  protected const BASE_SESSION_KEY = 'copg_map_';
29  protected const MODE_KEY = self::BASE_SESSION_KEY . 'mode';
30  protected const AREA_NR_KEY = self::BASE_SESSION_KEY . 'area_nr';
31  protected const AREA_TYPE_KEY = self::BASE_SESSION_KEY . 'area_type';
32  protected const LINK_TYPE_KEY = self::BASE_SESSION_KEY . 'link_type';
33  protected const LINK_TARGET_KEY = self::BASE_SESSION_KEY . 'link_target';
34  protected const LINK_FRAME_KEY = self::BASE_SESSION_KEY . 'link_frame';
35  protected const COORDS_KEY = self::BASE_SESSION_KEY . 'coords';
36 
37  public function __construct()
38  {
39  }
40 
41  public function setMode(string $mode): void
42  {
43  \ilSession::set(self::MODE_KEY, $mode);
44  }
45 
46  public function getMode(): string
47  {
48  return \ilSession::get(self::MODE_KEY) ?? "";
49  }
50 
51  public function setAreaNr(string $area_nr): void
52  {
53  \ilSession::set(self::AREA_NR_KEY, $area_nr);
54  }
55 
56  public function getAreaNr(): string
57  {
58  return \ilSession::get(self::AREA_NR_KEY) ?? "";
59  }
60 
61  public function setAreaType(string $area_type): void
62  {
63  \ilSession::set(self::AREA_TYPE_KEY, $area_type);
64  }
65 
66  public function getAreaType(): string
67  {
68  return \ilSession::get(self::AREA_TYPE_KEY) ?? "";
69  }
70 
71  public function setCoords(string $coords): void
72  {
73  \ilSession::set(self::COORDS_KEY, $coords);
74  }
75 
76  public function getCoords(): string
77  {
78  return \ilSession::get(self::COORDS_KEY) ?? "";
79  }
80 
81  public function setLinkType(string $link_type): void
82  {
83  \ilSession::set(self::LINK_TYPE_KEY, $link_type);
84  }
85 
86  public function getLinkType(): string
87  {
88  return \ilSession::get(self::LINK_TYPE_KEY) ?? "";
89  }
90 
91  public function setLinkTarget(string $link_target): void
92  {
93  \ilSession::set(self::LINK_TARGET_KEY, $link_target);
94  }
95 
96  public function getLinkTarget(): string
97  {
98  return \ilSession::get(self::LINK_TARGET_KEY) ?? "";
99  }
100 
101  public function setLinkFrame(string $link_frame): void
102  {
103  \ilSession::set(self::LINK_FRAME_KEY, $link_frame);
104  }
105 
106  public function getLinkFrame(): string
107  {
108  return \ilSession::get(self::LINK_FRAME_KEY) ?? "";
109  }
110 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
get(string $key, Refinery\Transformation $t)
Get passed parameter, if not data passed, get key from http request.
static set(string $a_var, $a_val)
Set a value.