36 if (!self::$instance) {
37 self::$instance =
new self($a_usr_id);
39 return self::$instance;
47 return (
bool) count($this->clipboard);
53 public function get(): array
64 foreach ($this->clipboard as $usr_id) {
75 public function add(array $a_usr_ids): void
77 $this->clipboard = array_unique(array_merge($this->clipboard, $a_usr_ids));
83 public function delete(array $a_usr_ids):
void 86 foreach ($this->
get() as $usr_id) {
87 if (!in_array($usr_id, $a_usr_ids)) {
88 $remaining[] = $usr_id;
97 public function replace(array $a_usr_ids): void
99 $this->clipboard = $a_usr_ids;
104 $this->clipboard = [];
118 protected function read(): void
static get(string $a_var)
__construct(int $a_user_id)
save()
Save clipboard content in session.
getValidatedContent()
Get validated content of clipboard.
replace(array $a_usr_ids)
Replace clipboard content.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
add(array $a_usr_ids)
Add entries to clipboard.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
hasContent()
Check if clipboard has content.
static ilUserClipboard $instance
static set(string $a_var, $a_val)
Set a value.
static getInstance(int $a_usr_id)
static _lookupLogin(int $a_user_id)