ILIAS  trunk Revision v11.0_alpha-1871-gde1fee8db3d
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\Component\Image\Image Interface Reference
+ Inheritance diagram for ILIAS\UI\Component\Image\Image:
+ Collaboration diagram for ILIAS\UI\Component\Image\Image:

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...
 
- Public Member Functions inherited from ILIAS\UI\Component\Component
 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...
 
- Public Member Functions inherited from ILIAS\UI\Component\JavaScriptBindable
 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...
 
- Public Member Functions inherited from ILIAS\UI\Component\Clickable
 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...
 
- Public Member Functions inherited from ILIAS\UI\Component\Triggerer
 withResetTriggeredSignals ()
 Get a component like this but reset any triggered signals of other components. More...
 
 getTriggeredSignals ()
 Get all triggered signals of this component. More...
 
- Public Member Functions inherited from ILIAS\Block
 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"
 

Detailed Description

Definition at line 35 of file Image.php.

Member Function Documentation

◆ getAction()

ILIAS\UI\Component\Image\Image::getAction ( )

Get the action of the image.

Returns
string|Signal[]

◆ getAdditionalHighResSources()

ILIAS\UI\Component\Image\Image::getAdditionalHighResSources ( )

Returns an associative array containing all additional resources as $min_width_in_pixels => $source entries.

Returns
array<integer, string>

◆ getAlt()

ILIAS\UI\Component\Image\Image::getAlt ( )

Get the alternative text for screen readers.

◆ getSource()

ILIAS\UI\Component\Image\Image::getSource ( )

Get the source (path) of the image.

◆ getType()

ILIAS\UI\Component\Image\Image::getType ( )

Get the type of the image.

◆ withAction()

ILIAS\UI\Implementation\Component\Image\Image::withAction (   $action)

Get an image like this with an action.

Parameters
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().

+ Here is the caller graph for this function:

◆ withAdditionalHighResSource()

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.

◆ withAlt()

ILIAS\UI\Component\Image\Image::withAlt ( string  $alt)

Set the alternative text for screen readers.

◆ withSource()

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.

Field Documentation

◆ RESPONSIVE

const ILIAS\UI\Component\Image\Image::RESPONSIVE = "responsive"

Definition at line 41 of file Image.php.

◆ STANDARD

const ILIAS\UI\Component\Image\Image::STANDARD = "standard"

Types of images.

Definition at line 40 of file Image.php.


The documentation for this interface was generated from the following file: