From 7195fab13114c7c79f05c2227b55c83eb79a2187 Mon Sep 17 00:00:00 2001 From: Sethakill Date: Wed, 18 May 2016 18:38:16 +0200 Subject: [PATCH] Allow to chaining calls in setSubmitDestructive and setSubmitProgressive. Change-Id: I926fa717edf146c64bb7e5287f9dc051e30f6566 --- includes/htmlform/HTMLForm.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 0dab3bb398..e891c9c832 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -1226,17 +1226,25 @@ class HTMLForm extends ContextSource { /** * Identify that the submit button in the form has a destructive action * @since 1.24 + * + * @return HTMLForm $this for chaining calls (since 1.28) */ public function setSubmitDestructive() { $this->mSubmitFlags = [ 'destructive', 'primary' ]; + + return $this; } /** * Identify that the submit button in the form has a progressive action * @since 1.25 + * + * @return HTMLForm $this for chaining calls (since 1.28) */ public function setSubmitProgressive() { $this->mSubmitFlags = [ 'progressive', 'primary' ]; + + return $this; } /** -- 2.20.1