ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_actions.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
17 function with_actions()
18 {
19  global $DIC;
20  $f = $DIC->ui()->factory();
21  $renderer = $DIC->ui()->renderer();
22 
23  $actions = $f->dropdown()->standard(array(
24  $f->button()->shy("ILIAS", "https://www.ilias.de"),
25  $f->button()->shy("GitHub", "https://www.github.com")
26  ));
27 
28  $block = $f->panel()->standard(
29  "Panel Title",
30  $f->panel()->sub("Sub Panel Title", $f->legacy("Some Content"))->withActions($actions)
31  );
32 
33  return $renderer->render($block);
34 }
$renderer
global $DIC
Definition: shib_login.php:25
with_actions()
description: > Example for rendering a sub panel with actions.