Skip to content

Commit

Permalink
Kirby 4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
medienbaecker committed Dec 18, 2023
1 parent d4d2e74 commit 1db5b9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "medienbaecker/kirby-modules",
"description": "Easily add modules to your pages",
"version": "2.5.0",
"version": "2.6.0",
"license": "MIT",
"authors": [
{
Expand Down
8 changes: 5 additions & 3 deletions lib/models.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php

use Kirby\Cms\Template;
use Kirby\Cms\Page;
use Kirby\Cms\Pages;
use Kirby\Template\Template;

class ModulePage extends Page {
public static function create(array $props) {
public static function create(array $props): Page {
if (option('medienbaecker.modules.autopublish', false)) {
$props['num'] = 9999;
}
Expand Down Expand Up @@ -32,7 +34,7 @@ public function moduleName() {
public function moduleId() {
return str_replace('.', '__', $this->intendedTemplate());
}
public function parents() {
public function parents(): Pages {
$parents = parent::parents();
return $parents->filter('slug', '!=', 'modules');
}
Expand Down

0 comments on commit 1db5b9a

Please sign in to comment.