|
MediaWiki master
|
Public Member Functions | |
| __construct (private array $actionsConfig, private readonly LoggerInterface $logger, private readonly ObjectFactory $objectFactory, private readonly HookContainer $hookContainer, private readonly 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 24 of file ActionFactory.php.
| MediaWiki\Actions\ActionFactory::__construct | ( | private array | $actionsConfig, |
| private readonly LoggerInterface | $logger, | ||
| private readonly ObjectFactory | $objectFactory, | ||
| private readonly HookContainer | $hookContainer, | ||
| private readonly IContentHandlerFactory | $contentHandlerFactory ) |
| array | $actionsConfig | Configured actions (eg those added by extensions to $wgActions) |
| LoggerInterface | $logger | |
| ObjectFactory | $objectFactory | |
| HookContainer | $hookContainer | |
| IContentHandlerFactory | $contentHandlerFactory |
Definition at line 170 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 208 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 307 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 350 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 418 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.