| [ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Base classes for actions done on pages. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
| File Size: | 386 lines (10 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| getClass( $action, array $overrides ) X-Ref |
| Get the Action subclass which should be used to handle this action, false if the action is disabled, or null if it's not recognised param: string $action param: array $overrides return: bool|null|string|callable |
| factory( $action, Page $page, IContextSource $context = null ) X-Ref |
| Get an appropriate Action subclass for the given action param: string $action param: Page $page param: IContextSource $context return: Action|bool|null False if the action is disabled, null |
| getActionName( IContextSource $context ) X-Ref |
| Get the action that will be executed, not necessarily the one passed passed through the "action" request parameter. Actions disabled in $wgActions will be replaced by "nosuchaction". param: IContextSource $context return: string Action name |
| exists( $name ) X-Ref |
| Check if a given action is recognised, even if it's disabled param: string $name Name of an action return: bool |
| getContext() X-Ref |
| Get the IContextSource in use here return: IContextSource |
| getRequest() X-Ref |
| Get the WebRequest being used for this instance return: WebRequest |
| getOutput() X-Ref |
| Get the OutputPage being used for this instance return: OutputPage |
| getUser() X-Ref |
| Shortcut to get the User being used for this instance return: User |
| getSkin() X-Ref |
| Shortcut to get the Skin being used for this instance return: Skin |
| getLanguage() X-Ref |
| Shortcut to get the user Language being used for this instance return: Language |
| getTitle() X-Ref |
| Shortcut to get the Title object from the page return: Title |
| msg() X-Ref |
| Get a Message object with context set Parameters are the same as wfMessage() return: Message |
| __construct( Page $page, IContextSource $context = null ) X-Ref |
| Constructor. Only public since 1.21 param: Page $page param: IContextSource $context |
| getRestriction() X-Ref |
| Get the permission required to perform this action. Often, but not always, the same as the action name return: string|null |
| checkCanExecute( User $user ) X-Ref |
| Checks if the given user (identified by an object) can perform this action. Can be overridden by sub-classes with more complicated permissions schemes. Failures here must throw subclasses of ErrorPageError param: User $user The user to check, or null to use the context user |
| requiresWrite() X-Ref |
| Whether this action requires the wiki not to be locked return: bool |
| requiresUnblock() X-Ref |
| Whether this action can still be executed by a blocked user return: bool |
| setHeaders() X-Ref |
| Set output headers for noindexing etc. This function will not be called through the execute() entry point, so only put UI-related stuff in here. |
| getPageTitle() X-Ref |
| Returns the name that goes in the \<h1\> page title return: string |
| getDescription() X-Ref |
| Returns the description that goes below the \<h1\> tag return: string |
| Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |