You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
765 B
43 lines
765 B
<?php
|
|
|
|
use Kirby\Toolkit\I18n;
|
|
|
|
return [
|
|
'props' => [
|
|
/**
|
|
* Unset inherited props
|
|
*/
|
|
'after' => null,
|
|
'autofocus' => null,
|
|
'before' => null,
|
|
'default' => null,
|
|
'disabled' => null,
|
|
'placeholder' => null,
|
|
'required' => null,
|
|
'translate' => null,
|
|
|
|
/**
|
|
* Text to be displayed
|
|
*/
|
|
'text' => function ($value = null) {
|
|
return I18n::translate($value, $value);
|
|
},
|
|
|
|
/**
|
|
* Change the design of the info box
|
|
*/
|
|
'theme' => function (string $theme = null) {
|
|
return $theme;
|
|
}
|
|
],
|
|
'computed' => [
|
|
'text' => function () {
|
|
if ($text = $this->text) {
|
|
$text = $this->model()->toSafeString($text);
|
|
$text = $this->kirby()->kirbytext($text);
|
|
return $text;
|
|
}
|
|
}
|
|
],
|
|
'save' => false,
|
|
];
|
|
|