MediaWiki master
|
Public Member Functions | |
__construct (array $actionsConfig, LoggerInterface $logger, ObjectFactory $objectFactory, HookContainer $hookContainer, IContentHandlerFactory $contentHandlerFactory) | |
getAction (string $actionName, $article, IContextSource $context) | |
Get an appropriate Action subclass for the given action, taking into account Article-specific overrides. | |
getActionInfo (string $name, $target=null) | |
Returns an object containing information about the given action, or null if the action is not known. | |
getActionName (IContextSource $context) | |
Get the name of the action that will be executed, not necessarily the one passed through the "action" request parameter. | |
getAllActionNames () | |
Get the names of all registered actions, including the ones defined for only certain content models. | |
Protected Member Functions | |
getArticle (IContextSource $context) | |
Protected to allow overriding with a partial mock in unit tests. | |
Definition at line 48 of file ActionFactory.php.
MediaWiki\Actions\ActionFactory::__construct | ( | array | $actionsConfig, |
LoggerInterface | $logger, | ||
ObjectFactory | $objectFactory, | ||
HookContainer | $hookContainer, | ||
IContentHandlerFactory | $contentHandlerFactory ) |
array | $actionsConfig | Configured actions (eg those added by extensions to $wgActions) |
LoggerInterface | $logger | |
ObjectFactory | $objectFactory | |
HookContainer | $hookContainer | |
IContentHandlerFactory | $contentHandlerFactory |
Definition at line 191 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 234 of file ActionFactory.php.
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 335 of file ActionFactory.php.
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 378 of file ActionFactory.php.
MediaWiki\Actions\ActionFactory::getAllActionNames | ( | ) |
Get the names of all registered actions, including the ones defined for only certain content models.
Definition at line 446 of file ActionFactory.php.
|
protected |
Protected to allow overriding with a partial mock in unit tests.
IContextSource | $context |
Definition at line 435 of file ActionFactory.php.