Skip to content

Commit

Permalink
feat: template base should not be nullable in onPageLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
samerton committed Dec 10, 2024
1 parent 0ef096e commit f0d1b08
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/classes/Core/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ public static function getModules(): iterable
* @param FakeSmarty|Smarty $smarty Instance of smarty to pass, to be removed in 2.3.0
* @param Navigation[] $navs Array of loaded navigation menus.
* @param Widgets $widgets Instance of widget class to pass.
* @param TemplateBase|null $template Active template to render.
* @param TemplateBase $template Active template to render.
*/
abstract public function onPageLoad(User $user, Pages $pages, Cache $cache, $smarty, iterable $navs, Widgets $widgets, ?TemplateBase $template);
abstract public function onPageLoad(User $user, Pages $pages, Cache $cache, $smarty, iterable $navs, Widgets $widgets, TemplateBase $template);

/**
* Determine loading arrangement of modules.
Expand Down
2 changes: 1 addition & 1 deletion modules/Cookie Consent/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function onDisable() {
// Not necessary for CookieConsent
}

public function onPageLoad(User $user, Pages $pages, Cache $cache, $smarty, $navs, Widgets $widgets, ?TemplateBase $template) {
public function onPageLoad(User $user, Pages $pages, Cache $cache, $smarty, $navs, Widgets $widgets, TemplateBase $template) {
$language = $this->_language;

// AdminCP
Expand Down
2 changes: 1 addition & 1 deletion modules/Core/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ public function onPageLoad(
$smarty,
iterable $navs,
Widgets $widgets,
?TemplateBase $template
TemplateBase $template
) {
$language = $this->_language;

Expand Down
2 changes: 1 addition & 1 deletion modules/Discord Integration/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function onDisable() {
public function onEnable() {
}

public function onPageLoad(User $user, Pages $pages, Cache $cache, $smarty, $navs, Widgets $widgets, ?TemplateBase $template) {
public function onPageLoad(User $user, Pages $pages, Cache $cache, $smarty, $navs, Widgets $widgets, TemplateBase $template) {
PermissionHandler::registerPermissions($this->getName(), [
'admincp.discord' => $this->_language->get('admin', 'integrations') . ' » ' . Discord::getLanguageTerm('discord'),
]);
Expand Down
2 changes: 1 addition & 1 deletion modules/Forum/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function onPageLoad(
$smarty,
iterable $navs,
Widgets $widgets,
?TemplateBase $template
TemplateBase $template
) {
// AdminCP
PermissionHandler::registerPermissions('Forum', [
Expand Down
2 changes: 1 addition & 1 deletion modules/Members/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function onDisable() {
// Not necessary for CookieConsent
}

public function onPageLoad(User $user, Pages $pages, Cache $cache, $smarty, $navs, Widgets $widgets, ?TemplateBase $template) {
public function onPageLoad(User $user, Pages $pages, Cache $cache, $smarty, $navs, Widgets $widgets, TemplateBase $template) {
$language = $this->_language;

// AdminCP
Expand Down

0 comments on commit f0d1b08

Please sign in to comment.