ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\Badge\PresentationHeader Class Reference
+ Collaboration diagram for ILIAS\Badge\PresentationHeader:

Public Member Functions

 __construct (private readonly Container $container, private readonly string $gui)
 
 show (string $active, ?Component $add=null)
 

Detailed Description

Definition at line 26 of file PresentationHeader.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Badge\PresentationHeader::__construct ( private readonly Container  $container,
private readonly string  $gui 
)

Definition at line 28 of file PresentationHeader.php.

31  {
32  }

Member Function Documentation

◆ show()

ILIAS\Badge\PresentationHeader::show ( string  $active,
?Component  $add = null 
)

Definition at line 34 of file PresentationHeader.php.

References $txt.

34  : void
35  {
36  $txt = [$this->container->language(), 'txt'];
37  $toolbar = $this->container->toolbar();
38  $view_control = $this->container->ui()->factory()->viewControl()->mode([
39  $txt('tile_view') => $this->container->ctrl()->getLinkTargetByClass($this->gui, 'listBadges'),
40  $txt('table_view') => $this->container->ctrl()->getLinkTargetByClass($this->gui, 'manageBadges'),
41  ], 'View')->withActive($active);
42 
43  $toolbar->addStickyItem($view_control);
44  if ($add) {
45  $toolbar->addStickyItem($add);
46  }
47  }
$txt
Definition: error.php:31

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