ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
Image.php
Go to the documentation of this file.
1
<?
php
2
3
/* Copyright (c) 2016 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
4
5
namespace
ILIAS\UI\Implementation\Component\Image
;
6
7
use
ILIAS\UI\Component
as
C
;
8
use
ILIAS\UI\Implementation\Component\ComponentHelper
;
9
14
class
Image
implements
C\Image\Image {
15
use
ComponentHelper
;
16
20
private
$type
;
21
25
private
$src
;
26
30
private
$alt
;
31
35
private
static
$types
= [
36
self::STANDARD,
37
self::RESPONSIVE
38
];
39
43
public
function
__construct
(
$type
, $source,
$alt
) {
44
$this->checkStringArg(
"src"
, $source);
45
$this->checkStringArg(
"alt"
,
$alt
);
46
$this->checkArgIsElement(
"type"
,
$type
, self::$types,
"image type"
);
47
48
$this->type =
$type
;
49
$this->src = $source;
50
$this->alt =
$alt
;
51
52
}
53
57
public
function
getType
() {
58
return
$this->type
;
59
}
60
64
public
function
withSource
($source){
65
$this->checkStringArg(
"src"
, $source);
66
67
$clone = clone $this;
68
$clone->src = $source;
69
return
$clone;
70
}
71
75
public
function
getSource
() {
76
return
$this->src
;
77
}
78
82
public
function
withAlt
(
$alt
){
83
$this->checkStringArg(
"alt"
,
$alt
);
84
85
$clone = clone $this;
86
$clone->alt =
$alt
;
87
return
$clone;
88
}
89
93
public
function
getAlt
() {
94
return
$this->alt
;
95
}
96
}
97
?>
ILIAS\UI\Implementation\Component\Image\Image\getType
getType()
Definition:
Image.php:57
ILIAS\UI\Implementation\Component\Image\Image\withSource
withSource($source)
Definition:
Image.php:64
ILIAS\UI\Component
ILIAS\UI\Implementation\Component\Image\Image\__construct
__construct($type, $source, $alt)
Definition:
Image.php:43
ILIAS\UI\Implementation\Component\Image\Image\getSource
getSource()
Definition:
Image.php:75
ILIAS\UI\Implementation\Component\Image\Image\$type
$type
Definition:
Image.php:20
ILIAS\UI\Implementation\Component\Image\Image
Definition:
Image.php:14
ILIAS\UI\Implementation\Component\Image\Image\$src
$src
Definition:
Image.php:25
ILIAS\UI\Implementation\Component\Image
Definition:
Factory.php:5
ILIAS\UI\Implementation\Component\Image\Image\getAlt
getAlt()
Definition:
Image.php:93
ComponentHelper
ILIAS\UI\Implementation\Component\Image\Image\$types
static $types
Definition:
Image.php:35
ILIAS\UI\Implementation\Component\Image\Image\$alt
$alt
Definition:
Image.php:30
php
ComponentHelper
ILIAS\UI\Implementation\Component\Image\Image\withAlt
withAlt($alt)
Definition:
Image.php:82
src
UI
Implementation
Component
Image
Image.php
Generated on Fri Feb 21 2025 19:00:50 for ILIAS by
1.8.13 (using
Doxyfile
)