ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
8
9class Standard extends Icon implements C\Symbol\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::USR
29 ,self::ROLT
30 ,self::LNGF
31 ,self::LNG
32 ,self::ROLE
33 ,self::GLO
34 ,self::ROOT
35 ,self::LM
36 ,self::FRM
37 ,self::EXC
38 ,self::AUTH
39 ,self::FOLD
40 ,self::FILE
41 ,self::TST
42 ,self::QPL
43 ,self::RECF
44 ,self::MEP
45 ,self::HTLM
46 ,self::SVY
47 ,self::SPL
48 ,self::CALS
49 ,self::TRAC
50 ,self::ASSF
51 ,self::STYS
52 ,self::WEBR
53 ,self::SEAS
54 ,self::EXTT
55 ,self::ADVE
56 ,self::PS
57 ,self::NWSS
58 ,self::FEED
59 ,self::MCST
60 ,self::RCRS
61 ,self::MDS
62 ,self::CMPS
63 ,self::FACS
64 ,self::SVYF
65 ,self::SESS
66 ,self::MCTS
67 ,self::WIKI
68 ,self::CRSR
69 ,self::CATR
70 ,self::TAGS
71 ,self::CERT
72 ,self::LRSS
73 ,self::ACCS
74 ,self::MOBS
75 ,self::FRMA
76 ,self::BOOK
77 ,self::SKMG
78 ,self::BLGA
79 ,self::PRFA
80 ,self::CHTR
81 ,self::CHTA
82 ,self::OTPL
83 ,self::BLOG
84 ,self::DCL
85 ,self::POLL
86 ,self::HLPS
87 ,self::ITGR
88 ,self::RCAT
89 ,self::RWIK
90 ,self::RLM
91 ,self::RGLO
92 ,self::RFIL
93 ,self::RGRP
94 ,self::RTST
95 ,self::ECSS
96 ,self::TOS
97 ,self::BIBL
98 ,self::SYSC
99 ,self::CLD
100 ,self::REPS
101 ,self::CRSS
102 ,self::GRPS
103 ,self::WBRS
104 ,self::PRTT
105 ,self::ORGU
106 ,self::WIKS
107 ,self::EXCS
108 ,self::TAXS
109 ,self::BIBS
110 ,self::AWRA
111 ,self::LOGS
112 ,self::PRG
113 ,self::PRGS
114 ,self::CADM
115 ,self::GRPR
116 ,self::BDGA
117 ,self::WFE
118 ,self::IASS
119 ,self::COPA
120 ,self::BGTK
121 ,self::MME
122 ,self::PDFG
123 ,self::DSHS
124 ,self::PRSS
125 ,self::NOTS
126 ,self::LHTS
127 ,self::COMS
128 ,self::LTIS
129 ,self::CMIS
130 ,self::TASK
131 ,self::REP
132 );
133
135 {
136 $this->checkStringArg("name", $name);
137 $this->checkStringArg("string", $aria_label);
138 $this->checkArgIsElement(
139 "size",
140 $size,
141 self::$possible_sizes,
142 implode('/', self::$possible_sizes)
143 );
144 $this->checkBoolArg("is_disabled", $is_disabled);
145 $this->name = $name;
146 $this->aria_label = $aria_label;
147 $this->size = $size;
148 $this->is_disabled = $is_disabled;
149 }
150
155 public function getAllStandardHandles() : array
156 {
158 }
159
163 public function isOutlined() : bool
164 {
165 return $this->is_outlined;
166 }
167
172 public function withIsOutlined(bool $is_outlined) : Icon
173 {
174 $clone = clone $this;
175 $clone->is_outlined = $is_outlined;
176 return $clone;
177 }
178}
An exception for terminatinating execution or to throw for unit testing.
__construct($name, $aria_label, $size, $is_disabled)
Definition: Standard.php:134
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
checkBoolArg($which, $value)
Throw an InvalidArgumentException if $value is not a bool.
trait ComponentHelper
Provides common functionality for component implementations.
checkArgIsElement($which, $value, $array, $name)
Throw an InvalidArgumentException if $value is not an element of array.