- Since
- 1.37
- Author
- DannyS712
Definition at line 45 of file ActionFactory.php.
◆ __construct()
MediaWiki\Actions\ActionFactory::__construct |
( |
array |
$actionsConfig, |
|
|
LoggerInterface |
$logger, |
|
|
ObjectFactory |
$objectFactory, |
|
|
HookContainer |
$hookContainer |
|
) |
| |
◆ actionExists()
MediaWiki\Actions\ActionFactory::actionExists |
( |
string |
$actionName | ) |
|
◆ getAction()
MediaWiki\Actions\ActionFactory::getAction |
( |
string |
$actionName, |
|
|
Article |
$article, |
|
|
IContextSource |
$context |
|
) |
| |
◆ getActionName()
MediaWiki\Actions\ActionFactory::getActionName |
( |
IContextSource |
$context | ) |
|
Get the name of the action that will be executed, not necessarily the one passed through the "action" request parameter.
Actions disabled in $wgActions will be replaced by "nosuchaction".
- Parameters
-
- Returns
- string Action name
Definition at line 309 of file ActionFactory.php.
◆ getActionSpec()
MediaWiki\Actions\ActionFactory::getActionSpec |
( |
string |
$actionName | ) |
|
|
private |
- Parameters
-
string | $actionName | should already be in all lowercase |
- Returns
- string|callable|bool|Action|array|null The spec for the action, in any valid form, based on $this->actionsConfig, or if not included there, CORE_ACTIONS, or null if the action does not exist.
Definition at line 219 of file ActionFactory.php.
Referenced by MediaWiki\Actions\ActionFactory\getAction().
◆ getArticle()
MediaWiki\Actions\ActionFactory::getArticle |
( |
IContextSource |
$context | ) |
|
|
protected |
Protected to allow overriding with a partial mock in unit tests.
- Parameters
-
- Returns
- Article
Definition at line 384 of file ActionFactory.php.
◆ $actionsConfig
array MediaWiki\Actions\ActionFactory::$actionsConfig |
|
private |
◆ $hookRunner
HookRunner MediaWiki\Actions\ActionFactory::$hookRunner |
|
private |
◆ $logger
LoggerInterface MediaWiki\Actions\ActionFactory::$logger |
|
private |
◆ $objectFactory
ObjectFactory MediaWiki\Actions\ActionFactory::$objectFactory |
|
private |
◆ CORE_ACTIONS
const MediaWiki\Actions\ActionFactory::CORE_ACTIONS |
|
private |
Core default action specifications.
'foo' => 'ClassName' Load the specified class which subclasses Action
'foo' => a callable Load the class returned by the callable
'foo' => true Load the class FooAction which subclasses Action
'foo' => false The action is disabled; show an error message
'foo' => an object Use the specified object, which subclasses Action, useful for tests.
'foo' => an array Slowly being used to replace the first three. The array
is treated as a specification for an ObjectFactory.
Definition at line 73 of file ActionFactory.php.
The documentation for this class was generated from the following file: