ILIAS
trunk Revision v11.0_alpha-1871-gde1fee8db3d
|
Public Member Functions | |
withSource (string $source) | |
Set the source (path) of the image. More... | |
getSource () | |
Get the source (path) of the image. More... | |
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 withSource() . More... | |
getAdditionalHighResSources () | |
Returns an associative array containing all additional resources as $min_width_in_pixels => $source entries. More... | |
getType () | |
Get the type of the image. More... | |
withAlt (string $alt) | |
Set the alternative text for screen readers. More... | |
getAlt () | |
Get the alternative text for screen readers. More... | |
withAction ($action) | |
Get an image like this with an action. More... | |
getAction () | |
Get the action of the image. More... | |
![]() | |
getCanonicalName () | |
Get the canonical name of the component. More... | |
reduceWith (\Closure $fn) | |
The scheme starts at the leaves of the structure and applies the function to each leave and moves up the tree recursively. More... | |
![]() | |
withOnLoadCode (Closure $binder) | |
withAdditionalOnLoadCode (Closure $binder) | |
Add some onload-code to the component instead of replacing the existing one. More... | |
getOnLoadCode () | |
Get the currently bound on load code. More... | |
![]() | |
withOnClick (Signal $signal) | |
Get a component like this, triggering a signal of another component on click. More... | |
appendOnClick (Signal $signal) | |
Get a component like this, triggering a signal of another component on click. More... | |
![]() | |
withResetTriggeredSignals () | |
Get a component like this but reset any triggered signals of other components. More... | |
getTriggeredSignals () | |
Get all triggered signals of this component. More... | |
![]() | |
init (array|\ArrayAccess &$define, array|\ArrayAccess &$implement, array|\ArrayAccess &$use, array|\ArrayAccess &$contribute, array|\ArrayAccess &$seek, array|\ArrayAccess &$provide, array|\ArrayAccess &$pull, array|\ArrayAccess &$internal,) | |
Data Fields | |
const | STANDARD = "standard" |
Types of images. More... | |
const | RESPONSIVE = "responsive" |
ILIAS\UI\Component\Image\Image::getAction | ( | ) |
Get the action of the image.
ILIAS\UI\Component\Image\Image::getAdditionalHighResSources | ( | ) |
Returns an associative array containing all additional resources as $min_width_in_pixels => $source
entries.
ILIAS\UI\Component\Image\Image::getAlt | ( | ) |
Get the alternative text for screen readers.
ILIAS\UI\Component\Image\Image::getSource | ( | ) |
Get the source (path) of the image.
ILIAS\UI\Component\Image\Image::getType | ( | ) |
Get the type of the image.
ILIAS\UI\Implementation\Component\Image\Image::withAction | ( | $action | ) |
Get an image like this with an action.
string|Signal[] | $action |
Definition at line 125 of file Image.php.
References ILIAS\UI\Implementation\Component\Image\Image\$action, and null.
Referenced by ilTestPlayerLayoutProvider\getLogoModification().
ILIAS\UI\Component\Image\Image::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 withSource()
.
The corresponding image will be asynchronously loaded once the size of the final image on the screen is defined. The high res source will be used, if the size of the image shown on the screen is bigger than $min_width_in_pixels
. If multiple additional high res sources are defined, the one with the biggest $min_width_in_pixels
that is still smaller than the actual size of the image on the screen will be chosen. To take advantage of this functionality the source set through withSource()
must be small as it will always be loaded first.
ILIAS\UI\Component\Image\Image::withAlt | ( | string | $alt | ) |
Set the alternative text for screen readers.
ILIAS\UI\Component\Image\Image::withSource | ( | string | $source | ) |
Set the source (path) of the image.
The complete path to the image has to be provided.
const ILIAS\UI\Component\Image\Image::RESPONSIVE = "responsive" |
const ILIAS\UI\Component\Image\Image::STANDARD = "standard" |