index-shop/kirby/src/Content/LockedContentException.php

32 lines
699 B
PHP
Raw Permalink Normal View History

2025-12-10 15:12:06 +01:00
<?php
namespace Kirby\Content;
use Kirby\Exception\LogicException;
/**
* @package Kirby Content
* @author Bastian Allgeier <bastian@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier
* @license https://getkirby.com/license
*/
class LockedContentException extends LogicException
{
protected static string $defaultKey = 'content.lock';
protected static string $defaultFallback = 'The version is locked';
protected static int $defaultHttpCode = 423;
public function __construct(
Lock $lock,
string|null $key = null,
string|null $message = null,
) {
parent::__construct(
message: $message,
key: $key,
details: $lock->toArray()
);
}
}