From f74dfb1ebed3666443495eb2f7929cdd612f3f1b Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Fri, 15 Dec 2023 17:28:43 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20pass=20kirby=20as=20property=20?= =?UTF-8?q?to=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Cms/App.php | 1 - src/Cms/Files.php | 1 - src/Cms/Pages.php | 1 - 3 files changed, 3 deletions(-) diff --git a/src/Cms/App.php b/src/Cms/App.php index e394af48d7..a011fbe9fa 100644 --- a/src/Cms/App.php +++ b/src/Cms/App.php @@ -1499,7 +1499,6 @@ public function site(): Site return $this->site ??= new Site([ 'errorPageId' => $this->options['error'] ?? 'error', 'homePageId' => $this->options['home'] ?? 'home', - 'kirby' => $this, 'url' => $this->url('index'), ]); } diff --git a/src/Cms/Files.php b/src/Cms/Files.php index 62907000b3..9e2436d996 100644 --- a/src/Cms/Files.php +++ b/src/Cms/Files.php @@ -94,7 +94,6 @@ public static function factory(array $files, Page|Site|User $parent): static foreach ($files as $props) { $props['collection'] = $collection; - $props['kirby'] = $kirby; $props['parent'] = $parent; $file = File::factory($props); diff --git a/src/Cms/Pages.php b/src/Cms/Pages.php index 95ccfc5d0f..11897bc4e4 100644 --- a/src/Cms/Pages.php +++ b/src/Cms/Pages.php @@ -158,7 +158,6 @@ public static function factory( } foreach ($pages as $props) { - $props['kirby'] = $kirby; $props['parent'] = $parent; $props['site'] = $site; $props['isDraft'] = $draft ?? $props['isDraft'] ?? $props['draft'] ?? false;