1 | <?php |
||
16 | class MslsAdminIcon { |
||
17 | /** |
||
18 | * IconType |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $iconType = 'action'; |
||
22 | |||
23 | /** |
||
24 | * Language |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $language; |
||
28 | |||
29 | /** |
||
30 | * Origin Language |
||
31 | * @var string |
||
32 | */ |
||
33 | public $origin_language; |
||
34 | |||
35 | /** |
||
36 | * Source |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $src; |
||
40 | |||
41 | /** |
||
42 | * URL |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $href; |
||
46 | |||
47 | /** |
||
48 | * Blog id |
||
49 | * @var int |
||
50 | */ |
||
51 | protected $blog_id; |
||
52 | |||
53 | /** |
||
54 | * Type |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $type; |
||
58 | |||
59 | /** |
||
60 | * Path |
||
61 | * @var string |
||
62 | */ |
||
63 | protected $path = 'post-new.php'; |
||
64 | |||
65 | /** |
||
66 | * The current object ID |
||
67 | * @var int |
||
68 | */ |
||
69 | protected $id; |
||
70 | |||
71 | /** |
||
72 | * Constructor |
||
73 | * |
||
74 | * @param string $type |
||
75 | */ |
||
76 | public function __construct( $type ) { |
||
80 | |||
81 | /** |
||
82 | * @return string |
||
83 | */ |
||
84 | public function __toString() { |
||
87 | |||
88 | /** |
||
89 | * @codeCoverageIgnore |
||
90 | * |
||
91 | * @return MslsAdminIcon |
||
92 | */ |
||
93 | public static function create() { |
||
103 | |||
104 | /** |
||
105 | * Set the icon path |
||
106 | * |
||
107 | * @return MslsAdminIcon |
||
108 | */ |
||
109 | public function set_icon_type( $iconType ) { |
||
114 | |||
115 | /** |
||
116 | * Set the path by type |
||
117 | * |
||
118 | * @return MslsAdminIcon |
||
119 | */ |
||
120 | public function set_path() { |
||
128 | |||
129 | /** |
||
130 | * Set language |
||
131 | * |
||
132 | * @param string $language |
||
133 | * |
||
134 | * @return MslsAdminIcon |
||
135 | */ |
||
136 | public function set_language( $language ) { |
||
141 | |||
142 | /** |
||
143 | * Set src |
||
144 | * |
||
145 | * @param string $src |
||
146 | * |
||
147 | * @return MslsAdminIcon |
||
148 | */ |
||
149 | public function set_src( $src ) { |
||
154 | |||
155 | /** |
||
156 | * Set href |
||
157 | * |
||
158 | * @param int $id |
||
159 | * |
||
160 | * @return MslsAdminIcon |
||
161 | */ |
||
162 | public function set_href( $id ) { |
||
167 | |||
168 | /** |
||
169 | * Sets the id of the object this icon is for |
||
170 | * |
||
171 | * @param int $id |
||
172 | * |
||
173 | * @return MslsAdminIcon |
||
174 | */ |
||
175 | public function set_id( $id ) { |
||
180 | |||
181 | /** |
||
182 | * Sets the origin language for this icon |
||
183 | * |
||
184 | * @param string $origin_language |
||
185 | * |
||
186 | * @return MslsAdminIcon |
||
187 | */ |
||
188 | public function set_origin_language( $origin_language ) { |
||
193 | |||
194 | /** |
||
195 | * Get image as html-tag |
||
196 | * |
||
197 | * @return string |
||
198 | */ |
||
199 | public function get_img() { |
||
202 | |||
203 | /** |
||
204 | * Get link as html-tag |
||
205 | * |
||
206 | * @return string |
||
207 | */ |
||
208 | public function get_a(): string { |
||
219 | |||
220 | /** |
||
221 | * Get icon as html-tag |
||
222 | * |
||
223 | * @return string |
||
224 | */ |
||
225 | public function get_icon() { |
||
239 | |||
240 | /** |
||
241 | * Creates new admin link |
||
242 | * |
||
243 | * @return string |
||
244 | */ |
||
245 | public function get_edit_new() { |
||
263 | |||
264 | } |
||
265 |