ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Standard.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 2017 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3 
5 
6 use ILIAS\UI\Component as C;
8 
9 class Standard extends Icon implements C\Icon\Standard
10 {
11 
15  protected $is_outlined = false;
16 
17 
18  private static $standard_icons = array(
19  self::GRP
20  ,self::CAT
21  ,self::CRS
22  ,self::MOB
23  ,self::MAIL
24  ,self::SAHS
25  ,self::ADM
26  ,self::USRF
27  ,self::ROLF
28  ,self::OBJF
29  ,self::USR
30  ,self::ROLT
31  ,self::LNGF
32  ,self::LNG
33  ,self::ROLE
34  ,self::DBK
35  ,self::GLO
36  ,self::ROOT
37  ,self::LM
38  ,self::NOTF
39  ,self::NOTE
40  ,self::FRM
41  ,self::EXC
42  ,self::AUTH
43  ,self::FOLD
44  ,self::FILE
45  ,self::TST
46  ,self::QPL
47  ,self::RECF
48  ,self::MEP
49  ,self::HTLM
50  ,self::SVY
51  ,self::SPL
52  ,self::CALS
53  ,self::TRAC
54  ,self::ASSF
55  ,self::STYS
56  ,self::CRSG
57  ,self::WEBR
58  ,self::SEAS
59  ,self::EXTT
60  ,self::ADVE
61  ,self::PS
62  ,self::NWSS
63  ,self::FEED
64  ,self::MCST
65  ,self::PDTS
66  ,self::RCRS
67  ,self::MDS
68  ,self::CMPS
69  ,self::FACS
70  ,self::SVYF
71  ,self::SESS
72  ,self::MCTS
73  ,self::WIKI
74  ,self::CRSR
75  ,self::CATR
76  ,self::TAGS
77  ,self::CERT
78  ,self::LRSS
79  ,self::ACCS
80  ,self::MOBS
81  ,self::FRMA
82  ,self::BOOK
83  ,self::SKMG
84  ,self::BLGA
85  ,self::PRFA
86  ,self::CHTR
87  ,self::CHTA
88  ,self::OTPL
89  ,self::BLOG
90  ,self::DCL
91  ,self::POLL
92  ,self::HLPS
93  ,self::ITGR
94  ,self::RCAT
95  ,self::RWIK
96  ,self::RLM
97  ,self::RGLO
98  ,self::RFIL
99  ,self::RGRP
100  ,self::RTST
101  ,self::ECSS
102  ,self::TOS
103  ,self::BIBL
104  ,self::SYSC
105  ,self::CLD
106  ,self::REPS
107  ,self::CRSS
108  ,self::GRPS
109  ,self::WBRS
110  ,self::PRTT
111  ,self::ORGU
112  ,self::WIKS
113  ,self::EXCS
114  ,self::TAXS
115  ,self::BIBS
116  ,self::AWRA
117  ,self::LOGS
118  ,self::PRG
119  ,self::PRGS
120  ,self::CADM
121  ,self::GRPR
122  ,self::BDGA
123  ,self::WFE
124  ,self::IASS
125  ,self::COPA
126  );
127 
129  {
130  $this->checkStringArg("name", $name);
131  $this->checkStringArg("string", $aria_label);
132  $this->checkArgIsElement(
133  "size",
134  $size,
135  self::$possible_sizes,
136  implode("/", self::$possible_sizes)
137  );
138  $this->checkBoolArg("is_disabled", $is_disabled);
139  $this->name = $name;
140  $this->aria_label = $aria_label;
141  $this->size = $size;
142  $this->is_disabled = $is_disabled;
143  }
144 
148  public function getAllStandardHandles()
149  {
150  return self::$standard_icons;
151  }
152 
156  public function isOutlined() : bool
157  {
158  return $this->is_outlined;
159  }
160 
165  public function withIsOutlined(bool $is_outlined) : Icon
166  {
167  $clone = clone $this;
168  $clone->is_outlined = $is_outlined;
169  return $clone;
170  }
171 }
checkArgIsElement($which, $value, $array, $name)
Throw an InvalidArgumentException if $value is not an element of array.
getAllStandardHandles()
get all defined constants
Definition: Standard.php:148
trait ComponentHelper
Provides common functionality for component implementations.
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
checkBoolArg($which, $value)
Throw an InvalidArgumentException if $value is not a bool.
font size
Definition: langcheck.php:162
__construct($name, $aria_label, $size, $is_disabled)
Definition: Standard.php:128