ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
StandardPageBuilder.php
Go to the documentation of this file.
2
5
12{
13
17 protected $ui;
21 protected $meta;
22
23
27 public function __construct()
28 {
29 global $DIC;
30 $this->ui = $DIC->ui();
31 $this->meta = $DIC->globalScreen()->layout()->meta();
32 }
33
34
40 public function build(PagePartProvider $parts) : Page
41 {
42 $header_image = $parts->getLogo();
43 $responsive_header_image = $parts->getResponsiveLogo();
44 $main_bar = $parts->getMainBar();
45 $meta_bar = $parts->getMetaBar();
46 $bread_crumbs = $parts->getBreadCrumbs();
47 $footer = $parts->getFooter();
48 $title = $parts->getTitle();
49 $short_title = $parts->getShortTitle();
50 $view_title = $parts->getViewTitle();
51
52 $page = $this->ui->factory()->layout()->page()->standard(
53 [$parts->getContent()],
54 $meta_bar,
55 $main_bar,
56 $bread_crumbs,
57 $header_image,
58 $footer,
59 $title,
60 $short_title,
61 $view_title
62 );
63
64 foreach ($this->meta->getMetaData()->getItems() as $meta_datum) {
65 $page = $page->withAdditionalMetaDatum($meta_datum->getKey(), $meta_datum->getValue());
66 }
67
68 if (null !== $responsive_header_image) {
69 $page = $page->withResponsiveLogo($responsive_header_image);
70 }
71
72 return $page;
73 }
74}
An exception for terminatinating execution or to throw for unit testing.
This describes the Page.
Definition: Page.php:14
ui()
Definition: ui.php:5
$DIC
Definition: xapitoken.php:46