ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Image.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28
36{
40 public const STANDARD = "standard";
41 public const RESPONSIVE = "responsive";
42
46 public function withSource(string $source): Image;
47
51 public function getSource(): string;
52
65 public function withAdditionalHighResSource(string $source, int $min_width_in_pixels): Image;
66
73 public function getAdditionalHighResSources(): array;
74
78 public function getType(): string;
79
83 public function withAlt(string $alt): Image;
84
85
89 public function getAlt(): string;
90
95 public function withAction($action): Image;
96
101 public function getAction();
102}
A component is the most general form of an entity in the UI.
Definition: Component.php:28
getAction()
Get the action of the image.
const STANDARD
Types of images.
Definition: Image.php:40
withAdditionalHighResSource(string $source, int $min_width_in_pixels)
Add an additional source (path) pointing to an image of higher resolution than the one set through wi...
getAlt()
Get the alternative text for screen readers.
getAdditionalHighResSources()
Returns an associative array containing all additional resources as $min_width_in_pixels => $source e...
withAlt(string $alt)
Set the alternative text for screen readers.
getType()
Get the type of the image.
getSource()
Get the source (path) of the image.
withAction($action)
Get an image like this with an action.
Definition: Image.php:125
withSource(string $source)
Set the source (path) of the image.
Interface to be extended by components that have the possibility to bind to Javascript.
This is the interface for Blocks.
Definition: Block.php:28
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.