38 private readonly
string $section,
39 private readonly
string $userSummary,
40 private readonly
string $autoSummary,
41 private readonly
bool $allowBlankSummary,
42 private readonly
Content $newContent,
43 private readonly ?
Content $originalContent,
44 private readonly
string $submitButtonLabel,
49 if ( $this->section ===
'new' ) {
55 !$this->allowBlankSummary &&
56 !$this->newContent->equals( $this->originalContent ) &&
57 !$this->newContent->isRedirect() &&
58 md5( $this->userSummary ) === $this->autoSummary
61 ->setResult(
false, self::AS_SUMMARY_NEEDED )
64 MessageValue::new( $this->submitButtonLabel )
if(!defined('MW_SETUP_CALLBACK'))
Abstract class for all constraints that can prevent edits.
To simplify the logic in EditPage, this constraint may be created even if the section being edited do...
__construct(private readonly string $section, private readonly string $userSummary, private readonly string $autoSummary, private readonly bool $allowBlankSummary, private readonly Content $newContent, private readonly ?Content $originalContent, private readonly string $submitButtonLabel,)
Status returned by edit constraints and other page editing checks.
static newGood( $value=null)
Factory function for good results.
Content objects represent page content, e.g.