ILIAS  trunk Revision v12.0_alpha-439-g30457d6d0bc
ILIAS\Badge\Table\TableContentWrapper Class Reference

This class provides a central helper method to wrap the content of a KS/UI > Table > Data into a specific HTML container/block element (div). More...

+ Collaboration diagram for ILIAS\Badge\Table\TableContentWrapper:

Public Member Functions

 __construct (private readonly Renderer $r, private readonly Factory $f,)
 
 wrap (Data $c)
 

Detailed Description

This class provides a central helper method to wrap the content of a KS/UI > Table > Data into a specific HTML container/block element (div).

Since badge images are of different types (PNG as raster image, SVG as vector image), and the UI > Table > Data > Column types are agnostic of the content type, we need this wrapper to apply specific CSS styles to the rendered HTML images to prevent visual issues (like image stretching, alignment issues, etc.). We were not able to adress this with IRSS flavours and picture mashines (crop etc.) to ensure equal dimensions of the images (in contrast to ILIAS <= 9.x), since this heavily relies on Imagick (which is not always available) and also causes issues because of the different image types (transparancy handling etc.). If the UI > Table > Data supports some non-responsive/fixed width image column types, this class MUST NOT be used anymore. See: https://mantis.ilias.de/view.php?id=46327, https://mantis.ilias.de/view.php?id=46551

Deprecated:

Definition at line 43 of file LegacyTableContentWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Badge\Table\TableContentWrapper::__construct ( private readonly Renderer  $r,
private readonly Factory  $f 
)

Definition at line 45 of file LegacyTableContentWrapper.php.

48 {
49 }

Member Function Documentation

◆ wrap()

ILIAS\Badge\Table\TableContentWrapper::wrap ( Data  $c)

Definition at line 51 of file LegacyTableContentWrapper.php.

52 {
53 return $this->f->legacy()->content(
54 '<div class="badge_table-wrapper">' . $this->r->render($c) . '</div>'
55 );
56 }
$c
Definition: deliver.php:25

References $c.


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