Upgrade to 4.0.0

This commit is contained in:
Bastian Allgeier
2023-11-28 09:33:56 +01:00
parent f96b96af76
commit 3b0b6546ca
480 changed files with 21371 additions and 13327 deletions

View File

@@ -59,7 +59,7 @@ return [
'url' => fn (File $file) => $file->url(),
'uuid' => fn (File $file) => $file->uuid()?->toString()
],
'type' => 'Kirby\Cms\File',
'type' => File::class,
'views' => [
'default' => [
'content',

View File

@@ -12,7 +12,6 @@ return [
'tabs' => fn (FileBlueprint $blueprint) => $blueprint->tabs(),
'title' => fn (FileBlueprint $blueprint) => $blueprint->title(),
],
'type' => 'Kirby\Cms\FileBlueprint',
'views' => [
],
'type' => FileBlueprint::class,
'views' => [],
];

View File

@@ -20,7 +20,7 @@ return [
'type' => fn (FileVersion $file) => $file->type(),
'url' => fn (FileVersion $file) => $file->url(),
],
'type' => 'Kirby\Cms\FileVersion',
'type' => FileVersion::class,
'views' => [
'default' => [
'dimensions',

View File

@@ -15,7 +15,7 @@ return [
'rules' => fn (Language $language) => $language->rules(),
'url' => fn (Language $language) => $language->url(),
],
'type' => 'Kirby\Cms\Language',
'type' => Language::class,
'views' => [
'default' => [
'code',

View File

@@ -0,0 +1,17 @@
<?php
use Kirby\Cms\License;
/**
* Page
*/
return [
'fields' => [
'status' => fn (License $license) => $license->status()->value(),
'code' => function (License $license) {
return $this->kirby()->user()->isAdmin() ? $license->code() : $license->code(true);
},
'type' => fn (License $license) => $license->type()->label(),
],
'type' => License::class,
];

View File

@@ -40,7 +40,7 @@ return [
'url' => fn (Page $page) => $page->url(),
'uuid' => fn (Page $page) => $page->uuid()?->toString()
],
'type' => 'Kirby\Cms\Page',
'type' => Page::class,
'views' => [
'compact' => [
'id',

View File

@@ -15,7 +15,6 @@ return [
'tabs' => fn (PageBlueprint $blueprint) => $blueprint->tabs(),
'title' => fn (PageBlueprint $blueprint) => $blueprint->title(),
],
'type' => 'Kirby\Cms\PageBlueprint',
'views' => [
],
'type' => PageBlueprint::class,
'views' => [],
];

View File

@@ -12,7 +12,7 @@ return [
'permissions' => fn (Role $role) => $role->permissions()->toArray(),
'title' => fn (Role $role) => $role->title(),
],
'type' => 'Kirby\Cms\Role',
'type' => Role::class,
'views' => [
'compact' => [
'description',

View File

@@ -19,7 +19,7 @@ return [
'title' => fn (Site $site) => $site->title()->value(),
'url' => fn (Site $site) => $site->url(),
],
'type' => 'Kirby\Cms\Site',
'type' => Site::class,
'views' => [
'compact' => [
'title',

View File

@@ -12,6 +12,6 @@ return [
'tabs' => fn (SiteBlueprint $blueprint) => $blueprint->tabs(),
'title' => fn (SiteBlueprint $blueprint) => $blueprint->title(),
],
'type' => 'Kirby\Cms\SiteBlueprint',
'type' => SiteBlueprint::class,
'views' => [],
];

View File

@@ -49,7 +49,7 @@ return [
return null;
}
],
'type' => 'Kirby\Cms\System',
'type' => System::class,
'views' => [
'login' => [
'authStatus',

View File

@@ -13,7 +13,7 @@ return [
'id' => fn (Translation $translation) => $translation->id(),
'name' => fn (Translation $translation) => $translation->name(),
],
'type' => 'Kirby\Cms\Translation',
'type' => Translation::class,
'views' => [
'compact' => [
'direction',

View File

@@ -27,7 +27,7 @@ return [
'username' => fn (User $user) => $user->username(),
'uuid' => fn (User $user) => $user->uuid()?->toString()
],
'type' => 'Kirby\Cms\User',
'type' => User::class,
'views' => [
'default' => [
'avatar',

View File

@@ -12,7 +12,6 @@ return [
'tabs' => fn (UserBlueprint $blueprint) => $blueprint->tabs(),
'title' => fn (UserBlueprint $blueprint) => $blueprint->title(),
],
'type' => 'Kirby\Cms\UserBlueprint',
'views' => [
],
'type' => UserBlueprint::class,
'views' => [],
];