* @link https://getkirby.com * @copyright Bastian Allgeier * @license https://getkirby.com/license */ class Dialog extends Json { protected static string $key = '$dialog'; /** * Renders dialogs */ public static function response($data, array $options = []): Response { // interpret true as success if ($data === true) { $data = [ 'code' => 200 ]; } return parent::response($data, $options); } }