init with kirby, vue and pagedjs interactive
This commit is contained in:
commit
dc0ae26464
968 changed files with 211706 additions and 0 deletions
119
public/kirby/config/api/models/File.php
Normal file
119
public/kirby/config/api/models/File.php
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\File;
|
||||
use Kirby\Form\Form;
|
||||
|
||||
/**
|
||||
* File
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'blueprint' => fn (File $file) => $file->blueprint(),
|
||||
'content' => fn (File $file) => Form::for($file)->values(),
|
||||
'dimensions' => fn (File $file) => $file->dimensions()->toArray(),
|
||||
'dragText' => fn (File $file) => $file->panel()->dragText(),
|
||||
'exists' => fn (File $file) => $file->exists(),
|
||||
'extension' => fn (File $file) => $file->extension(),
|
||||
'filename' => fn (File $file) => $file->filename(),
|
||||
'id' => fn (File $file) => $file->id(),
|
||||
'link' => fn (File $file) => $file->panel()->url(true),
|
||||
'mime' => fn (File $file) => $file->mime(),
|
||||
'modified' => fn (File $file) => $file->modified('c'),
|
||||
'name' => fn (File $file) => $file->name(),
|
||||
'next' => fn (File $file) => $file->next(),
|
||||
'nextWithTemplate' => function (File $file) {
|
||||
$files = $file->templateSiblings()->sorted();
|
||||
$index = $files->indexOf($file);
|
||||
|
||||
return $files->nth($index + 1);
|
||||
},
|
||||
'niceSize' => fn (File $file) => $file->niceSize(),
|
||||
'options' => fn (File $file) => $file->panel()->options(),
|
||||
'panelImage' => fn (File $file) => $file->panel()->image(),
|
||||
'panelUrl' => fn (File $file) => $file->panel()->url(true),
|
||||
'prev' => fn (File $file) => $file->prev(),
|
||||
'prevWithTemplate' => function (File $file) {
|
||||
$files = $file->templateSiblings()->sorted();
|
||||
$index = $files->indexOf($file);
|
||||
|
||||
return $files->nth($index - 1);
|
||||
},
|
||||
'parent' => fn (File $file) => $file->parent(),
|
||||
'parents' => fn (File $file) => $file->parents()->flip(),
|
||||
'size' => fn (File $file) => $file->size(),
|
||||
'template' => fn (File $file) => $file->template(),
|
||||
'thumbs' => function ($file) {
|
||||
if ($file->isResizable() === false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
'tiny' => $file->resize(128)->url(),
|
||||
'small' => $file->resize(256)->url(),
|
||||
'medium' => $file->resize(512)->url(),
|
||||
'large' => $file->resize(768)->url(),
|
||||
'huge' => $file->resize(1024)->url(),
|
||||
];
|
||||
},
|
||||
'type' => fn (File $file) => $file->type(),
|
||||
'url' => fn (File $file) => $file->url(),
|
||||
'uuid' => fn (File $file) => $file->uuid()?->toString()
|
||||
],
|
||||
'type' => File::class,
|
||||
'views' => [
|
||||
'default' => [
|
||||
'content',
|
||||
'dimensions',
|
||||
'exists',
|
||||
'extension',
|
||||
'filename',
|
||||
'id',
|
||||
'link',
|
||||
'mime',
|
||||
'modified',
|
||||
'name',
|
||||
'next' => 'compact',
|
||||
'niceSize',
|
||||
'parent' => 'compact',
|
||||
'options',
|
||||
'prev' => 'compact',
|
||||
'size',
|
||||
'template',
|
||||
'type',
|
||||
'url',
|
||||
'uuid'
|
||||
],
|
||||
'compact' => [
|
||||
'filename',
|
||||
'id',
|
||||
'link',
|
||||
'type',
|
||||
'url',
|
||||
'uuid'
|
||||
],
|
||||
'panel' => [
|
||||
'blueprint',
|
||||
'content',
|
||||
'dimensions',
|
||||
'extension',
|
||||
'filename',
|
||||
'id',
|
||||
'link',
|
||||
'mime',
|
||||
'modified',
|
||||
'name',
|
||||
'nextWithTemplate' => 'compact',
|
||||
'niceSize',
|
||||
'options',
|
||||
'panelIcon',
|
||||
'panelImage',
|
||||
'parent' => 'compact',
|
||||
'parents' => ['id', 'slug', 'title'],
|
||||
'prevWithTemplate' => 'compact',
|
||||
'template',
|
||||
'type',
|
||||
'url',
|
||||
'uuid'
|
||||
]
|
||||
],
|
||||
];
|
||||
17
public/kirby/config/api/models/FileBlueprint.php
Normal file
17
public/kirby/config/api/models/FileBlueprint.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\FileBlueprint;
|
||||
|
||||
/**
|
||||
* FileBlueprint
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'name' => fn (FileBlueprint $blueprint) => $blueprint->name(),
|
||||
'options' => fn (FileBlueprint $blueprint) => $blueprint->options(),
|
||||
'tabs' => fn (FileBlueprint $blueprint) => $blueprint->tabs(),
|
||||
'title' => fn (FileBlueprint $blueprint) => $blueprint->title(),
|
||||
],
|
||||
'type' => FileBlueprint::class,
|
||||
'views' => [],
|
||||
];
|
||||
59
public/kirby/config/api/models/FileVersion.php
Normal file
59
public/kirby/config/api/models/FileVersion.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\FileVersion;
|
||||
|
||||
/**
|
||||
* FileVersion
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'dimensions' => fn (FileVersion $file) => $file->dimensions()->toArray(),
|
||||
'exists' => fn (FileVersion $file) => $file->exists(),
|
||||
'extension' => fn (FileVersion $file) => $file->extension(),
|
||||
'filename' => fn (FileVersion $file) => $file->filename(),
|
||||
'id' => fn (FileVersion $file) => $file->id(),
|
||||
'mime' => fn (FileVersion $file) => $file->mime(),
|
||||
'modified' => fn (FileVersion $file) => $file->modified('c'),
|
||||
'name' => fn (FileVersion $file) => $file->name(),
|
||||
'niceSize' => fn (FileVersion $file) => $file->niceSize(),
|
||||
'size' => fn (FileVersion $file) => $file->size(),
|
||||
'type' => fn (FileVersion $file) => $file->type(),
|
||||
'url' => fn (FileVersion $file) => $file->url(),
|
||||
],
|
||||
'type' => FileVersion::class,
|
||||
'views' => [
|
||||
'default' => [
|
||||
'dimensions',
|
||||
'exists',
|
||||
'extension',
|
||||
'filename',
|
||||
'id',
|
||||
'mime',
|
||||
'modified',
|
||||
'name',
|
||||
'niceSize',
|
||||
'size',
|
||||
'type',
|
||||
'url'
|
||||
],
|
||||
'compact' => [
|
||||
'filename',
|
||||
'id',
|
||||
'type',
|
||||
'url',
|
||||
],
|
||||
'panel' => [
|
||||
'dimensions',
|
||||
'extension',
|
||||
'filename',
|
||||
'id',
|
||||
'mime',
|
||||
'modified',
|
||||
'name',
|
||||
'niceSize',
|
||||
'template',
|
||||
'type',
|
||||
'url'
|
||||
]
|
||||
],
|
||||
];
|
||||
30
public/kirby/config/api/models/Language.php
Normal file
30
public/kirby/config/api/models/Language.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\Language;
|
||||
|
||||
/**
|
||||
* Language
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'code' => fn (Language $language) => $language->code(),
|
||||
'default' => fn (Language $language) => $language->isDefault(),
|
||||
'direction' => fn (Language $language) => $language->direction(),
|
||||
'locale' => fn (Language $language) => $language->locale(),
|
||||
'name' => fn (Language $language) => $language->name(),
|
||||
'rules' => fn (Language $language) => $language->rules(),
|
||||
'url' => fn (Language $language) => $language->url(),
|
||||
],
|
||||
'type' => Language::class,
|
||||
'views' => [
|
||||
'default' => [
|
||||
'code',
|
||||
'default',
|
||||
'direction',
|
||||
'locale',
|
||||
'name',
|
||||
'rules',
|
||||
'url'
|
||||
]
|
||||
]
|
||||
];
|
||||
17
public/kirby/config/api/models/License.php
Normal file
17
public/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,
|
||||
];
|
||||
96
public/kirby/config/api/models/Page.php
Normal file
96
public/kirby/config/api/models/Page.php
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\Page;
|
||||
use Kirby\Form\Form;
|
||||
|
||||
/**
|
||||
* Page
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'blueprint' => fn (Page $page) => $page->blueprint(),
|
||||
'blueprints' => fn (Page $page) => $page->blueprints(),
|
||||
'children' => fn (Page $page) => $page->children(),
|
||||
'content' => fn (Page $page) => Form::for($page)->values(),
|
||||
'drafts' => fn (Page $page) => $page->drafts(),
|
||||
'errors' => fn (Page $page) => $page->errors(),
|
||||
'files' => fn (Page $page) => $page->files()->sorted(),
|
||||
'hasChildren' => fn (Page $page) => $page->hasChildren(),
|
||||
'hasDrafts' => fn (Page $page) => $page->hasDrafts(),
|
||||
'hasFiles' => fn (Page $page) => $page->hasFiles(),
|
||||
'id' => fn (Page $page) => $page->id(),
|
||||
'isSortable' => fn (Page $page) => $page->isSortable(),
|
||||
'num' => fn (Page $page) => $page->num(),
|
||||
'options' => fn (Page $page) => $page->panel()->options(['preview']),
|
||||
'panelImage' => fn (Page $page) => $page->panel()->image(),
|
||||
'parent' => fn (Page $page) => $page->parent(),
|
||||
'parents' => fn (Page $page) => $page->parents()->flip(),
|
||||
'previewUrl' => fn (Page $page) => $page->previewUrl(),
|
||||
'siblings' => function (Page $page) {
|
||||
if ($page->isDraft() === true) {
|
||||
return $page->parentModel()->children()->not($page);
|
||||
}
|
||||
|
||||
return $page->siblings();
|
||||
},
|
||||
'slug' => fn (Page $page) => $page->slug(),
|
||||
'status' => fn (Page $page) => $page->status(),
|
||||
'template' => fn (Page $page) => $page->intendedTemplate()->name(),
|
||||
'title' => fn (Page $page) => $page->title()->value(),
|
||||
'url' => fn (Page $page) => $page->url(),
|
||||
'uuid' => fn (Page $page) => $page->uuid()?->toString()
|
||||
],
|
||||
'type' => Page::class,
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'id',
|
||||
'title',
|
||||
'url',
|
||||
'num',
|
||||
'uuid'
|
||||
],
|
||||
'default' => [
|
||||
'content',
|
||||
'id',
|
||||
'status',
|
||||
'num',
|
||||
'options',
|
||||
'parent' => 'compact',
|
||||
'slug',
|
||||
'template',
|
||||
'title',
|
||||
'url',
|
||||
'uuid'
|
||||
],
|
||||
'panel' => [
|
||||
'id',
|
||||
'blueprint',
|
||||
'content',
|
||||
'status',
|
||||
'options',
|
||||
'next' => ['id', 'slug', 'title'],
|
||||
'parents' => ['id', 'slug', 'title'],
|
||||
'prev' => ['id', 'slug', 'title'],
|
||||
'previewUrl',
|
||||
'slug',
|
||||
'title',
|
||||
'url',
|
||||
'uuid'
|
||||
],
|
||||
'selector' => [
|
||||
'id',
|
||||
'title',
|
||||
'parent' => [
|
||||
'id',
|
||||
'title'
|
||||
],
|
||||
'children' => [
|
||||
'hasChildren',
|
||||
'id',
|
||||
'panelIcon',
|
||||
'panelImage',
|
||||
'title',
|
||||
],
|
||||
]
|
||||
],
|
||||
];
|
||||
20
public/kirby/config/api/models/PageBlueprint.php
Normal file
20
public/kirby/config/api/models/PageBlueprint.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\PageBlueprint;
|
||||
|
||||
/**
|
||||
* PageBlueprint
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'name' => fn (PageBlueprint $blueprint) => $blueprint->name(),
|
||||
'num' => fn (PageBlueprint $blueprint) => $blueprint->num(),
|
||||
'options' => fn (PageBlueprint $blueprint) => $blueprint->options(),
|
||||
'preview' => fn (PageBlueprint $blueprint) => $blueprint->preview(),
|
||||
'status' => fn (PageBlueprint $blueprint) => $blueprint->status(),
|
||||
'tabs' => fn (PageBlueprint $blueprint) => $blueprint->tabs(),
|
||||
'title' => fn (PageBlueprint $blueprint) => $blueprint->title(),
|
||||
],
|
||||
'type' => PageBlueprint::class,
|
||||
'views' => [],
|
||||
];
|
||||
23
public/kirby/config/api/models/Role.php
Normal file
23
public/kirby/config/api/models/Role.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\Role;
|
||||
|
||||
/**
|
||||
* Role
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'description' => fn (Role $role) => $role->description(),
|
||||
'name' => fn (Role $role) => $role->name(),
|
||||
'permissions' => fn (Role $role) => $role->permissions()->toArray(),
|
||||
'title' => fn (Role $role) => $role->title(),
|
||||
],
|
||||
'type' => Role::class,
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'description',
|
||||
'name',
|
||||
'title'
|
||||
]
|
||||
]
|
||||
];
|
||||
52
public/kirby/config/api/models/Site.php
Normal file
52
public/kirby/config/api/models/Site.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\Site;
|
||||
use Kirby\Form\Form;
|
||||
|
||||
/**
|
||||
* Site
|
||||
*/
|
||||
return [
|
||||
'default' => fn () => $this->site(),
|
||||
'fields' => [
|
||||
'blueprint' => fn (Site $site) => $site->blueprint(),
|
||||
'children' => fn (Site $site) => $site->children(),
|
||||
'content' => fn (Site $site) => Form::for($site)->values(),
|
||||
'drafts' => fn (Site $site) => $site->drafts(),
|
||||
'files' => fn (Site $site) => $site->files()->sorted(),
|
||||
'options' => fn (Site $site) => $site->permissions()->toArray(),
|
||||
'previewUrl' => fn (Site $site) => $site->previewUrl(),
|
||||
'title' => fn (Site $site) => $site->title()->value(),
|
||||
'url' => fn (Site $site) => $site->url(),
|
||||
],
|
||||
'type' => Site::class,
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'title',
|
||||
'url'
|
||||
],
|
||||
'default' => [
|
||||
'content',
|
||||
'options',
|
||||
'title',
|
||||
'url'
|
||||
],
|
||||
'panel' => [
|
||||
'title',
|
||||
'blueprint',
|
||||
'content',
|
||||
'options',
|
||||
'previewUrl',
|
||||
'url'
|
||||
],
|
||||
'selector' => [
|
||||
'title',
|
||||
'children' => [
|
||||
'id',
|
||||
'title',
|
||||
'panelIcon',
|
||||
'hasChildren'
|
||||
],
|
||||
]
|
||||
]
|
||||
];
|
||||
17
public/kirby/config/api/models/SiteBlueprint.php
Normal file
17
public/kirby/config/api/models/SiteBlueprint.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\SiteBlueprint;
|
||||
|
||||
/**
|
||||
* SiteBlueprint
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'name' => fn (SiteBlueprint $blueprint) => $blueprint->name(),
|
||||
'options' => fn (SiteBlueprint $blueprint) => $blueprint->options(),
|
||||
'tabs' => fn (SiteBlueprint $blueprint) => $blueprint->tabs(),
|
||||
'title' => fn (SiteBlueprint $blueprint) => $blueprint->title(),
|
||||
],
|
||||
'type' => SiteBlueprint::class,
|
||||
'views' => [],
|
||||
];
|
||||
91
public/kirby/config/api/models/System.php
Normal file
91
public/kirby/config/api/models/System.php
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\System;
|
||||
use Kirby\Toolkit\Str;
|
||||
|
||||
/**
|
||||
* System
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'ascii' => fn () => Str::$ascii,
|
||||
'authStatus' => fn () => $this->kirby()->auth()->status()->toArray(),
|
||||
'defaultLanguage' => fn () => $this->kirby()->panelLanguage(),
|
||||
'isOk' => fn (System $system) => $system->isOk(),
|
||||
'isInstallable' => fn (System $system) => $system->isInstallable(),
|
||||
'isInstalled' => fn (System $system) => $system->isInstalled(),
|
||||
'isLocal' => fn (System $system) => $system->isLocal(),
|
||||
'multilang' => fn () => $this->kirby()->option('languages', false) !== false,
|
||||
'languages' => fn () => $this->kirby()->languages(),
|
||||
'license' => fn (System $system) => $system->license(),
|
||||
'locales' => function () {
|
||||
$locales = [];
|
||||
$translations = $this->kirby()->translations();
|
||||
foreach ($translations as $translation) {
|
||||
$locales[$translation->code()] = $translation->locale();
|
||||
}
|
||||
return $locales;
|
||||
},
|
||||
'loginMethods' => fn (System $system) => array_keys($system->loginMethods()),
|
||||
'requirements' => fn (System $system) => $system->toArray(),
|
||||
'site' => fn (System $system) => $system->title(),
|
||||
'slugs' => fn () => Str::$language,
|
||||
'title' => fn () => $this->site()->title()->value(),
|
||||
'translation' => function () {
|
||||
$code = $this->user()?->language() ??
|
||||
$this->kirby()->panelLanguage();
|
||||
|
||||
return
|
||||
$this->kirby()->translation($code) ??
|
||||
$this->kirby()->translation('en');
|
||||
},
|
||||
'kirbytext' => fn () => $this->kirby()->option('panel.kirbytext') ?? true,
|
||||
'user' => fn () => $this->user(),
|
||||
'version' => function () {
|
||||
if ($this->user()?->role()->permissions()->for('access', 'system') === true) {
|
||||
return $this->kirby()->version();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
],
|
||||
'type' => System::class,
|
||||
'views' => [
|
||||
'login' => [
|
||||
'authStatus',
|
||||
'isOk',
|
||||
'isInstallable',
|
||||
'isInstalled',
|
||||
'loginMethods',
|
||||
'title',
|
||||
'translation'
|
||||
],
|
||||
'troubleshooting' => [
|
||||
'isOk',
|
||||
'isInstallable',
|
||||
'isInstalled',
|
||||
'title',
|
||||
'translation',
|
||||
'requirements'
|
||||
],
|
||||
'panel' => [
|
||||
'ascii',
|
||||
'defaultLanguage',
|
||||
'isOk',
|
||||
'isInstalled',
|
||||
'isLocal',
|
||||
'kirbytext',
|
||||
'languages',
|
||||
'license',
|
||||
'locales',
|
||||
'multilang',
|
||||
'requirements',
|
||||
'site',
|
||||
'slugs',
|
||||
'title',
|
||||
'translation',
|
||||
'user' => 'auth',
|
||||
'version'
|
||||
]
|
||||
],
|
||||
];
|
||||
24
public/kirby/config/api/models/Translation.php
Normal file
24
public/kirby/config/api/models/Translation.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\Translation;
|
||||
|
||||
/**
|
||||
* Translation
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'author' => fn (Translation $translation) => $translation->author(),
|
||||
'data' => fn (Translation $translation) => $translation->dataWithFallback(),
|
||||
'direction' => fn (Translation $translation) => $translation->direction(),
|
||||
'id' => fn (Translation $translation) => $translation->id(),
|
||||
'name' => fn (Translation $translation) => $translation->name(),
|
||||
],
|
||||
'type' => Translation::class,
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'direction',
|
||||
'id',
|
||||
'name'
|
||||
]
|
||||
]
|
||||
];
|
||||
81
public/kirby/config/api/models/User.php
Normal file
81
public/kirby/config/api/models/User.php
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\User;
|
||||
use Kirby\Form\Form;
|
||||
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
return [
|
||||
'default' => fn () => $this->user(),
|
||||
'fields' => [
|
||||
'avatar' => fn (User $user) => $user->avatar()?->crop(512),
|
||||
'blueprint' => fn (User $user) => $user->blueprint(),
|
||||
'content' => fn (User $user) => Form::for($user)->values(),
|
||||
'email' => fn (User $user) => $user->email(),
|
||||
'files' => fn (User $user) => $user->files()->sorted(),
|
||||
'id' => fn (User $user) => $user->id(),
|
||||
'language' => fn (User $user) => $user->language(),
|
||||
'name' => fn (User $user) => $user->name()->value(),
|
||||
'next' => fn (User $user) => $user->next(),
|
||||
'options' => fn (User $user) => $user->panel()->options(),
|
||||
'panelImage' => fn (User $user) => $user->panel()->image(),
|
||||
'permissions' => fn (User $user) => $user->role()->permissions()->toArray(),
|
||||
'prev' => fn (User $user) => $user->prev(),
|
||||
'role' => fn (User $user) => $user->role(),
|
||||
'roles' => fn (User $user) => $user->roles(),
|
||||
'username' => fn (User $user) => $user->username(),
|
||||
'uuid' => fn (User $user) => $user->uuid()?->toString()
|
||||
],
|
||||
'type' => User::class,
|
||||
'views' => [
|
||||
'default' => [
|
||||
'avatar',
|
||||
'content',
|
||||
'email',
|
||||
'id',
|
||||
'language',
|
||||
'name',
|
||||
'next' => 'compact',
|
||||
'options',
|
||||
'prev' => 'compact',
|
||||
'role',
|
||||
'username',
|
||||
'uuid'
|
||||
],
|
||||
'compact' => [
|
||||
'avatar' => 'compact',
|
||||
'id',
|
||||
'email',
|
||||
'language',
|
||||
'name',
|
||||
'role' => 'compact',
|
||||
'username',
|
||||
'uuid'
|
||||
],
|
||||
'auth' => [
|
||||
'avatar' => 'compact',
|
||||
'permissions',
|
||||
'email',
|
||||
'id',
|
||||
'name',
|
||||
'role',
|
||||
'language'
|
||||
],
|
||||
'panel' => [
|
||||
'avatar' => 'compact',
|
||||
'blueprint',
|
||||
'content',
|
||||
'email',
|
||||
'id',
|
||||
'language',
|
||||
'name',
|
||||
'next' => ['id', 'name'],
|
||||
'options',
|
||||
'prev' => ['id', 'name'],
|
||||
'role',
|
||||
'username',
|
||||
'uuid'
|
||||
],
|
||||
]
|
||||
];
|
||||
17
public/kirby/config/api/models/UserBlueprint.php
Normal file
17
public/kirby/config/api/models/UserBlueprint.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Cms\UserBlueprint;
|
||||
|
||||
/**
|
||||
* UserBlueprint
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'name' => fn (UserBlueprint $blueprint) => $blueprint->name(),
|
||||
'options' => fn (UserBlueprint $blueprint) => $blueprint->options(),
|
||||
'tabs' => fn (UserBlueprint $blueprint) => $blueprint->tabs(),
|
||||
'title' => fn (UserBlueprint $blueprint) => $blueprint->title(),
|
||||
],
|
||||
'type' => UserBlueprint::class,
|
||||
'views' => [],
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue