Initial commit
This commit is contained in:
commit
73c6b816c0
716 changed files with 170045 additions and 0 deletions
52
kirby/config/api/models/Site.php
Normal file
52
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' => 'Kirby\Cms\Site',
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'title',
|
||||
'url'
|
||||
],
|
||||
'default' => [
|
||||
'content',
|
||||
'options',
|
||||
'title',
|
||||
'url'
|
||||
],
|
||||
'panel' => [
|
||||
'title',
|
||||
'blueprint',
|
||||
'content',
|
||||
'options',
|
||||
'previewUrl',
|
||||
'url'
|
||||
],
|
||||
'selector' => [
|
||||
'title',
|
||||
'children' => [
|
||||
'id',
|
||||
'title',
|
||||
'panelIcon',
|
||||
'hasChildren'
|
||||
],
|
||||
]
|
||||
]
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue