ILIAS  release_7 Revision v7.30-3-g800a261c036
StandardPageBuilder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28
34{
38 protected $ui;
42 protected $meta;
43
47 public function __construct()
48 {
49 global $DIC;
50 $this->ui = $DIC->ui();
51 $this->meta = $DIC->globalScreen()->layout()->meta();
52 }
53
58 public function build(PagePartProvider $parts) : Page
59 {
60 $meta_bar = $parts->getMetaBar();
61 $main_bar = $parts->getMainBar();
62 $bread_crumbs = $parts->getBreadCrumbs();
63 $header_image = $parts->getLogo();
64 $footer = $parts->getFooter();
65 $title = $parts->getTitle();
66 $short_title = $parts->getShortTitle();
67 $view_title = $parts->getViewTitle();
68
69 $standard = $this->ui->factory()->layout()->page()->standard(
70 [$parts->getContent()],
71 $meta_bar,
72 $main_bar,
73 $bread_crumbs,
74 $header_image,
75 $footer,
76 $title,
77 $short_title,
78 $view_title
79 );
80
81 if (($responsive_logo = $parts->getResponsiveLogo()) !== null) {
82 $standard = $standard->withResponsiveLogo($responsive_logo);
83 }
84
85 foreach ($this->meta->getMetaData()->getItems() as $meta_datum) {
86 $standard = $standard->withAdditionalMetaDatum($meta_datum->getKey(), $meta_datum->getValue());
87 }
88
89 return $standard->withSystemInfos($parts->getSystemInfos())
90 ->withTextDirection($this->meta->getTextDirection() ?? Standard::LTR);
91 }
92}
An exception for terminatinating execution or to throw for unit testing.
Provides fluid interface to RBAC services.
Definition: UIServices.php:10
global $DIC
Definition: goto.php:24
This describes a standard button.
Definition: Standard.php:13
This describes the Page.
Definition: Page.php:14
@noinspection PhpPropertyOnlyWrittenInspection
ui()
Definition: ui.php:5