ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilWebLinkBaseParameter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
27 public const string UNDEFINED_NAME = 'undefined';
28 public const string USER_ID_NAME = 'user_id';
29 public const string LOGIN_NAME = 'login';
30 public const string MATRICULATION_NAME = 'matriculation';
31
35 public const array VALUES = [
36 self::UNDEFINED_NAME => 0,
37 self::USER_ID_NAME => 1,
38 self::LOGIN_NAME => 3,
39 self::MATRICULATION_NAME => 4
40 ];
41
46 public const array VALUES_TEXT = [
47 self::VALUES[self::UNDEFINED_NAME] => 'links_select_one',
48 self::VALUES[self::USER_ID_NAME] => 'links_user_id',
49 self::VALUES[self::LOGIN_NAME] => 'links_user_name',
50 self::VALUES[self::MATRICULATION_NAME] => 'matriculation',
51 ];
52
53 protected int $value;
54 protected string $name;
55
56 public function __construct(int $value, string $name)
57 {
58 $this->value = $value;
59 $this->name = $name;
60 }
61
62 public function getValue(): int
63 {
64 return $this->value;
65 }
66
67 public function getName(): string
68 {
69 return $this->name;
70 }
71}
Base class for parameters attached to Web Link items.
const array VALUES_TEXT
Keys of the language variables to the possible values, e.g.
const array VALUES
TODO Once the GUI is updated, undefined can be dropped.
__construct(int $value, string $name)