Upgrade to 4.0.0
This commit is contained in:
@@ -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',
|
||||
|
@@ -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' => [],
|
||||
];
|
||||
|
@@ -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',
|
||||
|
@@ -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',
|
||||
|
17
kirby/config/api/models/License.php
Normal file
17
kirby/config/api/models/License.php
Normal 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,
|
||||
];
|
@@ -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',
|
||||
|
@@ -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' => [],
|
||||
];
|
||||
|
@@ -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',
|
||||
|
@@ -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',
|
||||
|
@@ -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' => [],
|
||||
];
|
||||
|
@@ -49,7 +49,7 @@ return [
|
||||
return null;
|
||||
}
|
||||
],
|
||||
'type' => 'Kirby\Cms\System',
|
||||
'type' => System::class,
|
||||
'views' => [
|
||||
'login' => [
|
||||
'authStatus',
|
||||
|
@@ -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',
|
||||
|
@@ -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',
|
||||
|
@@ -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' => [],
|
||||
];
|
||||
|
Reference in New Issue
Block a user