This commit is contained in:
Bastian Allgeier
2020-07-07 12:40:13 +02:00
parent 5f025ac2c2
commit f79d2e960c
176 changed files with 10532 additions and 5343 deletions

View File

@@ -1,7 +1,7 @@
<?php
use Kirby\Cms\Form;
use Kirby\Data\Yaml;
use Kirby\Data\Data;
use Kirby\Toolkit\I18n;
return [
@@ -24,6 +24,14 @@ return [
// be lowercase as well.
return array_change_key_case($columns);
},
/**
* Toggles duplicating rows for the structure
*/
'duplicate' => function (bool $duplicate = true) {
return $duplicate;
},
/**
* The placeholder text if no items have been added yet
*/
@@ -62,6 +70,12 @@ return [
'min' => function (int $min = null) {
return $min;
},
/**
* Toggles adding to the top or bottom of the list
*/
'prepend' => function (bool $prepend = null) {
return $prepend;
},
/**
* Toggles drag & drop sorting
*/
@@ -131,7 +145,7 @@ return [
],
'methods' => [
'rows' => function ($value) {
$rows = Yaml::decode($value);
$rows = Data::decode($value, 'yaml');
$value = [];
foreach ($rows as $index => $row) {