3 declare(strict_types=1);
    19     $f = $DIC->ui()->factory();
    24     $url = $DIC->http()->request()->getRequestTarget();
    26     $actions = 
$f->dropdown()->standard([
    27         $f->button()->shy(
"ILIAS", 
"https://www.ilias.de"),
    28         $f->button()->shy(
"GitHub", 
"https://www.github.com")
    30     $current_presentation = 
'simple';
    34     $presentation_options = [
    36         'detailed' => 
'Detailed'    38     $modes = 
$f->viewControl()->mode(
    40             array_keys($presentation_options),
    41             static function ($carry, $item) use ($presentation_options, 
$url) {
    42                 $carry[$presentation_options[$item]] = 
"$url&mode=$item";
    48     )->withActive($presentation_options[$current_presentation]);
    50     $content = 
"Just some information.";
    51     if ($current_presentation === 
'detailed') {
    52         $content = 
"This is clearly a lot more information!";
    55     $sub1 = 
$f->panel()->sub(
"Sub Panel Title 1", 
$f->legacy($content))
    56             ->withFurtherInformation(
$f->card()->standard(
"Card Heading")->withSections(array(
$f->legacy(
"Card Content"))));
    57     $sub2 = 
$f->panel()->sub(
"Sub Panel Title 2", 
$f->legacy($content));
    59     $block = 
$f->panel()->report(
"Report Title", [$sub1, $sub2])
    60         ->withActions($actions)
    61         ->withViewControls([$modes]);
 
with_view_controls()
 description: > Example for rendering a report panel.