first version
This commit is contained in:
34
kirby/config/api/models/Translation.php
Executable file
34
kirby/config/api/models/Translation.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Cms\Translation;
|
||||
|
||||
/**
|
||||
* Translation
|
||||
*/
|
||||
return [
|
||||
'fields' => [
|
||||
'author' => function (Translation $translation) {
|
||||
return $translation->author();
|
||||
},
|
||||
'data' => function (Translation $translation) {
|
||||
return $translation->dataWithFallback();
|
||||
},
|
||||
'direction' => function (Translation $translation) {
|
||||
return $translation->direction();
|
||||
},
|
||||
'id' => function (Translation $translation) {
|
||||
return $translation->id();
|
||||
},
|
||||
'name' => function (Translation $translation) {
|
||||
return $translation->name();
|
||||
},
|
||||
],
|
||||
'type' => Translation::class,
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'direction',
|
||||
'id',
|
||||
'name'
|
||||
]
|
||||
]
|
||||
];
|
Reference in New Issue
Block a user