ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilBadgeManagementSessionRepository.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
27  public const KEY = "bdgclpbrd";
28 
29  public function __construct()
30  {
31  }
32 
33  public function setBadgeIds(array $ids): void
34  {
35  \ilSession::set(self::KEY, $ids);
36  }
37 
38  public function getBadgeIds(): array
39  {
40  if (\ilSession::has(self::KEY)) {
41  return \ilSession::get(self::KEY);
42  }
43  return [];
44  }
45 
46  public function clear(): void
47  {
48  \ilSession::clear(self::KEY);
49  }
50 }
static has($a_var)
get(string $key, Refinery\Transformation $t)
Get passed parameter, if not data passed, get key from http request.
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.