Page MenuHomeWickedGov Phorge

FormlessAction.php
No OneTemporary

Size
885 B
Referenced Files
None
Subscribers
None

FormlessAction.php

<?php
/**
* Base classes for actions done on pages.
*
* @license GPL-2.0-or-later
* @file
* @ingroup Actions
*/
namespace MediaWiki\Actions;
/**
* An action which just does something, without showing a form first.
*
* @stable to extend
*
* @ingroup Actions
*/
abstract class FormlessAction extends Action {
/**
* Show something on GET request.
* @return string|null Will be added to the HTMLForm if present, or just added to the
* output if not. Return null to not add anything
*/
abstract public function onView();
/**
* @stable to override
*/
public function show() {
$this->setHeaders();
// This will throw exceptions if there's a problem
$this->checkCanExecute( $this->getUser() );
$this->getOutput()->addHTML( $this->onView() );
}
}
/** @deprecated class alias since 1.44 */
class_alias( FormlessAction::class, 'FormlessAction' );

File Metadata

Mime Type
text/x-php
Expires
Sat, Dec 20, 03:41 (1 d, 9 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
71/03/5f8f2973cf845dda2690ab1d98b2
Default Alt Text
FormlessAction.php (885 B)

Event Timeline