ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ImportSessionRepository.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29{
30 public const KEY_BASE = "svy_import_mob_xhtml";
31
32 public function __construct()
33 {
34 }
35
36 public function getMobs(): array
37 {
38 $entries = [];
39 if (\ilSession::has(self::KEY_BASE)) {
40 $entries = \ilSession::get(self::KEY_BASE);
41 }
42 return $entries;
43 }
44
45 public function addMob(string $label, string $uri, string $type = "", string $id = ""): void
46 {
47 $entries = [];
48 if (\ilSession::has(self::KEY_BASE)) {
49 $entries = \ilSession::get(self::KEY_BASE);
50 }
51 $entries[] = [
52 "mob" => $label,
53 "uri" => $uri,
54 "type" => $type,
55 "id" => $id
56 ];
57 \ilSession::set(self::KEY_BASE, $entries);
58 }
59
60 public function clearMobs(): void
61 {
62 if (\ilSession::has(self::KEY_BASE)) {
63 \ilSession::clear(self::KEY_BASE);
64 }
65 }
66}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
addMob(string $label, string $uri, string $type="", string $id="")
static get(string $a_var)
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
static has($a_var)