Upgrade to 3.7.0

This commit is contained in:
Bastian Allgeier
2022-06-27 11:59:19 +02:00
parent 0751a6510d
commit 1c22148d7b
674 changed files with 5052 additions and 3082 deletions
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
Regular → Executable
View File
Regular → Executable
+2 -1
View File
@@ -1,5 +1,6 @@
<?php
use Kirby\Cms\App;
use Kirby\Data\Data;
use Kirby\Toolkit\A;
@@ -62,7 +63,7 @@ return [
},
'toPages' => function ($value = null) {
$pages = [];
$kirby = kirby();
$kirby = App::instance();
foreach (Data::decode($value, 'yaml') as $id) {
if (is_array($id) === true) {
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+11
View File
@@ -106,6 +106,7 @@ return [
},
'columns' => function () {
$columns = [];
$mobile = 0;
if (empty($this->columns)) {
foreach ($this->fields as $field) {
@@ -133,6 +134,10 @@ return [
continue;
}
if (($columnProps['mobile'] ?? false) === true) {
$mobile++;
}
$columns[$columnName] = array_merge($columnProps, [
'type' => $field['type'],
'label' => $field['label'] ?? $field['name']
@@ -140,6 +145,12 @@ return [
}
}
// make the first column visible on mobile
// if no other mobile columns are defined
if ($mobile === 0) {
$columns[array_key_first($columns)]['mobile'] = true;
}
return $columns;
}
],
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+41
View File
@@ -0,0 +1,41 @@
<?php
return [
'mixins' => ['options'],
'props' => [
/**
* Unset inherited props
*/
'after' => null,
'before' => null,
'icon' => null,
'placeholder' => null,
/**
* Toggles will automatically span the full width of the field. With the grow option, you can disable this behaviour for a more compact layout.
*/
'grow' => function (bool $grow = true) {
return $grow;
},
/**
* If `false` all labels will be hidden for icon-only toggles.
*/
'labels' => function (bool $labels = true) {
return $labels;
},
/**
* A toggle can be deactivated on click. If reset is `false` deactivating a toggle is no longer possible.
*/
'reset' => function (bool $reset = true) {
return $reset;
}
],
'computed' => [
'default' => function () {
return $this->sanitizeOption($this->default);
},
'value' => function () {
return $this->sanitizeOption($this->value) ?? '';
},
]
];
Regular → Executable
View File
Regular → Executable
+2 -1
View File
@@ -1,5 +1,6 @@
<?php
use Kirby\Cms\App;
use Kirby\Data\Data;
use Kirby\Toolkit\A;
@@ -58,7 +59,7 @@ return [
},
'toUsers' => function ($value = null) {
$users = [];
$kirby = kirby();
$kirby = App::instance();
foreach (Data::decode($value, 'yaml') as $email) {
if (is_array($email) === true) {
Regular → Executable
View File