MediaWiki
master
|
Public Member Functions | |
__construct (array $actionsConfig, LoggerInterface $logger, ObjectFactory $objectFactory, HookContainer $hookContainer) | |
getAction (string $actionName, $article, IContextSource $context) | |
Get an appropriate Action subclass for the given action, taking into account Article-specific overrides. More... | |
getActionInfo (string $name, $target=null) | |
Returns an object containing information about the given action, or null if the action is not known. More... | |
getActionName (IContextSource $context) | |
Get the name of the action that will be executed, not necessarily the one passed through the "action" request parameter. More... | |
Protected Member Functions | |
getArticle (IContextSource $context) | |
Protected to allow overriding with a partial mock in unit tests. More... | |
Definition at line 47 of file ActionFactory.php.
MediaWiki\Actions\ActionFactory::__construct | ( | array | $actionsConfig, |
LoggerInterface | $logger, | ||
ObjectFactory | $objectFactory, | ||
HookContainer | $hookContainer | ||
) |
array | $actionsConfig | Configured actions (eg those added by extensions to $wgActions) |
LoggerInterface | $logger | |
ObjectFactory | $objectFactory | |
HookContainer | $hookContainer |
Definition at line 186 of file ActionFactory.php.
MediaWiki\Actions\ActionFactory::getAction | ( | string | $actionName, |
$article, | |||
IContextSource | $context | ||
) |
Get an appropriate Action subclass for the given action, taking into account Article-specific overrides.
string | $actionName | |
Article | PageIdentity | $article | The target on which the action is to be performed. |
IContextSource | $context |
Definition at line 227 of file ActionFactory.php.
References MediaWiki\Title\Title\newFromPageIdentity(), and Article\newFromTitle().
MediaWiki\Actions\ActionFactory::getActionInfo | ( | string | $name, |
$target = null |
|||
) |
Returns an object containing information about the given action, or null if the action is not known.
Currently, this will also return null if the action is known but disabled. This may change in the future.
string | $name | |
Article | PageIdentity | null | $target | The target on which the action is to be performed, if known. This is used to apply page-specific action overrides. |
Definition at line 315 of file ActionFactory.php.
References MediaWiki\Title\Title\newMainPage().
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".
IContextSource | $context |
Definition at line 350 of file ActionFactory.php.
|
protected |
Protected to allow overriding with a partial mock in unit tests.
IContextSource | $context |
Definition at line 407 of file ActionFactory.php.