34 private string $section;
35 private string $userComment;
37 public function __construct(
string $section,
string $userComment ) {
38 $this->section = $section;
39 $this->userComment = $userComment;
43 if ( $this->section ===
'new' && $this->userComment ===
'' ) {
44 return self::CONSTRAINT_FAILED;
46 return self::CONSTRAINT_PASSED;
51 if ( $this->section ===
'new' && $this->userComment ===
'' ) {
52 $statusValue->
fatal(
'missingcommenttext' );
53 $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.