36 private string $result;
42 $this->readOnlyMode = $readOnlyMode;
46 $this->result = $this->readOnlyMode->isReadOnly() ?
47 self::CONSTRAINT_FAILED :
48 self::CONSTRAINT_PASSED;
55 if ( $this->result === self::CONSTRAINT_FAILED ) {
58 $statusValue->
fatal(
'readonlytext' );
59 $statusValue->value = self::AS_READ_ONLY_PAGE;
Verify site is not in read only mode.
getLegacyStatus()
Get the legacy status for failure (or success)
__construct(ReadOnlyMode $readOnlyMode)
Generic operation result class Has warning/error list, boolean status and arbitrary value.
fatal( $message,... $parameters)
Add an error and set OK to false, indicating that the operation as a whole was fatal.
Interface for all constraints that can prevent edits.