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,6 +1,6 @@
<?php
use Kirby\Data\Yaml;
use Kirby\Data\Data;
use Kirby\Toolkit\A;
return [
@@ -78,7 +78,7 @@ return [
'toFiles' => function ($value = null) {
$files = [];
foreach (Yaml::decode($value) as $id) {
foreach (Data::decode($value, 'yaml') as $id) {
if (is_array($id) === true) {
$id = $id['id'] ?? null;
}

View File

@@ -3,12 +3,10 @@
return [
'extends' => 'tags',
'props' => [
/**
* Unset inherited props
*/
'accept' => null,
/**
* Custom icon to replace the arrow down.
*/
@@ -17,8 +15,10 @@ return [
},
/**
* Enable/disable the search in the dropdown
* Also limit displayed items (display: 20)
* and set minimum number of characters to search (min: 3)
*/
'search' => function (bool $search = true) {
'search' => function ($search = true) {
return $search;
},
/**

View File

@@ -1,6 +1,6 @@
<?php
use Kirby\Data\Yaml;
use Kirby\Data\Data;
use Kirby\Toolkit\A;
return [
@@ -72,7 +72,7 @@ return [
$pages = [];
$kirby = kirby();
foreach (Yaml::decode($value) as $id) {
foreach (Data::decode($value, 'yaml') as $id) {
if (is_array($id) === true) {
$id = $id['id'] ?? null;
}

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) {

View File

@@ -1,6 +1,6 @@
<?php
use Kirby\Data\Yaml;
use Kirby\Data\Data;
use Kirby\Toolkit\A;
return [
@@ -54,7 +54,7 @@ return [
$users = [];
$kirby = kirby();
foreach (Yaml::decode($value) as $email) {
foreach (Data::decode($value, 'yaml') as $email) {
if (is_array($email) === true) {
$email = $email['email'] ?? null;
}