34 private string $section;
35 private string $userComment;
41 public function __construct(
string $section,
string $userComment ) {
42 $this->section = $section;
43 $this->userComment = $userComment;
47 if ( $this->section ===
'new' && $this->userComment ===
'' ) {
48 return self::CONSTRAINT_FAILED;
50 return self::CONSTRAINT_PASSED;
55 if ( $this->section ===
'new' && $this->userComment ===
'' ) {
56 $statusValue->
fatal(
'missingcommenttext' );
57 $statusValue->value = self::AS_TEXTBOX_EMPTY;
if(!defined('MW_SETUP_CALLBACK'))
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.