first version
This commit is contained in:
23
kirby/config/fields/info.php
Executable file
23
kirby/config/fields/info.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Toolkit\I18n;
|
||||
|
||||
return [
|
||||
'props' => [
|
||||
'text' => function ($value = null) {
|
||||
return I18n::translate($value, $value);
|
||||
},
|
||||
],
|
||||
'computed' => [
|
||||
'text' => function () {
|
||||
$text = $this->text;
|
||||
|
||||
if ($model = $this->model()) {
|
||||
$text = $this->model()->toString($text);
|
||||
}
|
||||
|
||||
return kirbytext($text);
|
||||
}
|
||||
],
|
||||
'save' => false,
|
||||
];
|
Reference in New Issue
Block a user