ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ILIAS\UI\examples\Breadcrumbs Namespace Reference

Functions

 breadcrumbs ()
 

description: > Example showing how to construct Breadcrumbs with an array of Links and extending the Breadcrumbs afterwards. More...

 

Function Documentation

◆ breadcrumbs()

ILIAS\UI\examples\Breadcrumbs\breadcrumbs ( )


description: > Example showing how to construct Breadcrumbs with an array of Links and extending the Breadcrumbs afterwards.

expected output: >

ILIAS shows two rows of clickable links separated by simple arrows (>).

Definition at line 17 of file breadcrumbs.php.

References Vendor\Package\$bar, $DIC, Vendor\Package\$f, and $renderer.

Referenced by ILIAS\UI\Implementation\Component\Layout\Page\Standard\__construct(), and BreadcrumbsTest\getFactory().

18 {
19  global $DIC;
20  $renderer = $DIC->ui()->renderer();
21  $f = $DIC->ui()->factory();
22 
23  $crumbs = array(
24  $f->link()->standard("entry1", '#'),
25  $f->link()->standard("entry2", '#'),
26  $f->link()->standard("entry3", '#'),
27  $f->link()->standard("entry4", '#')
28  );
29 
30  $bar = $f->breadcrumbs($crumbs);
31 
32  $bar_extended = $bar->withAppendedItem(
33  $f->link()->standard("entry5", '#')
34  );
35 
36  return $renderer->render($bar)
37  . $renderer->render($bar_extended);
38 }
$renderer
global $DIC
Definition: shib_login.php:25
+ Here is the caller graph for this function: