Upgrade to 3.6.0

This commit is contained in:
Bastian Allgeier
2021-11-16 14:53:37 +01:00
parent 7388fa4d24
commit 92b7a330fa
318 changed files with 20017 additions and 6878 deletions

39
kirby/src/Panel/Dialog.php Executable file
View File

@@ -0,0 +1,39 @@
<?php
namespace Kirby\Panel;
/**
* The Dialog response class handles Fiber
* requests to render the JSON object for
* Panel dialogs
* @since 3.6.0
*
* @package Kirby Panel
* @author Bastian Allgeier <bastian@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://getkirby.com/license
*/
class Dialog extends Json
{
protected static $key = '$dialog';
/**
* Renders dialogs
*
* @param mixed $data
* @param array $options
* @return \Kirby\Http\Response
*/
public static function response($data, array $options = [])
{
// interpret true as success
if ($data === true) {
$data = [
'code' => 200
];
}
return parent::response($data, $options);
}
}