30 private $components =
null;
39 $this->skinContext = $skinContext;
52 if ( $this->components === null ) {
53 $this->registerComponents();
55 $component = $this->components[$name] ??
null;
57 throw new RuntimeException(
'Unknown component: ' . $name );
69 if ( $this->components ===
null ) {
70 $this->registerComponents();
72 return $this->components;
83 private function registerComponent(
string $name ) {
84 $skin = $this->skinContext;
85 $user = $skin->getUser();
102 $skin->getMessageLocalizer(),
104 $skin->getRelevantTitle()
110 case 'last-modified':
112 $skin, $skin->getOutput()->getRevisionTimestamp()
119 throw new RuntimeException(
'Unknown component: ' . $name );
121 $this->components[$name] = $component;
127 private function registerComponents() {
128 $this->registerComponent(
'copyright' );
129 $this->registerComponent(
'last-modified' );
130 $this->registerComponent(
'logos' );
131 $this->registerComponent(
'toc' );
132 $this->registerComponent(
'search-box' );
133 $this->registerComponent(
'footer' );
Parent class for all special pages.
static newSearchPage(User $user)
Get the users preferred search page.