Page MenuHomeWickedGov Phorge

DisableForm.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

DisableForm.php

<?php
namespace MediaWiki\Extension\OATHAuth\HTMLForm;
use MediaWiki\Message\Message;
class DisableForm extends OATHAuthOOUIHTMLForm {
/** @inheritDoc */
public function onSuccess() {
$this->getOutput()->addWikiMsg( 'oathauth-disabledoath' );
}
/** @inheritDoc */
protected function getDescriptors() {
$this->setSubmitTextMsg( 'oathauth-disable-generic' );
$this->setSubmitDestructive();
$disableWarning = $this->msg(
'oathauth-disable-method-warning',
$this->module->getDisplayName()
)->parseAsBlock();
$customMessage = $this->module->getDisableWarningMessage();
if ( $customMessage instanceof Message ) {
$disableWarning .= $customMessage->parseAsBlock();
}
return [
'warning' => [
'type' => 'info',
'raw' => true,
'default' => $disableWarning
]
];
}
/** @inheritDoc */
public function onSubmit( array $formData ) {
$this->oathRepo->removeAllOfType(
$this->oathUser,
$this->module->getName(),
$this->getRequest()->getIP(),
true
);
return true;
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Nov 22, 16:25 (16 h, 37 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9c/1c/9c076d381364bf0b3d4141452720
Default Alt Text
DisableForm.php (1 KB)

Event Timeline