Upgrade to 3.1.2

This commit is contained in:
Bastian Allgeier
2019-04-09 14:34:12 +02:00
parent 852a14595e
commit eb29ef6d6c
58 changed files with 535 additions and 258 deletions

View File

@@ -4,6 +4,7 @@ use Kirby\Cms\Form;
use Kirby\Cms\Blueprint;
return [
'mixins' => ['min'],
'props' => [
/**
* Unset inherited props
@@ -28,6 +29,14 @@ return [
'empty' => function ($empty = null) {
return I18n::translate($empty, $empty);
},
/**
* Set the default rows for the structure
*/
'default' => function (array $default = null) {
return $default;
},
/**
* Fields setup for the structure form. Works just like fields in regular forms.
*/
@@ -113,7 +122,7 @@ return [
}
return $columns;
},
}
],
'methods' => [
'rows' => function ($value) {
@@ -149,11 +158,11 @@ return [
]
];
},
'save' => function () {
'save' => function ($value) {
$data = [];
foreach ($this->value() as $row) {
$data[] = $this->form($row)->data();
foreach ($value as $row) {
$data[] = $this->form($row)->data(true);
}
return $data;