Go to the documentation of this file.
77 Hooks::run(
'ActionModifyFormFields', [ $this->
getName(), &$this->fields, $this->page ] );
84 $form->setSubmitCallback( [ $this,
'onSubmit' ] );
87 $form->setAction(
$title->getLocalURL( [
'action' => $this->getName() ] ) );
89 $params = array_diff_key(
91 [
'action' =>
null,
'title' =>
null ]
94 $form->addHiddenField(
'redirectparams',
wfArrayToCgi( $params ) );
97 $form->addPreText( $this->
preText() );
98 $form->addPostText( $this->
postText() );
102 Hooks::run(
'ActionBeforeFormDisplay', [ $this->
getName(), &$form, $this->page ] );
120 abstract public function onSubmit( $data );
143 if ( $form->show() ) {
setHeaders()
Set output headers for noindexing etc.
getRequest()
Get the WebRequest being used for this instance.
getName()
Return the name of the action this object responds to.
Actions are things which can be done to pages (edit, delete, rollback, etc).
getContext()
Get the IContextSource in use here.
checkCanExecute(User $user)
Checks if the given user (identified by an object) can perform this action.
getUser()
Shortcut to get the User being used for this instance.
getTitle()
Shortcut to get the Title object from the page.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
wfArrayToCgi( $array1, $array2=null, $prefix='')
This function takes one or two arrays as input, and returns a CGI-style string, e....