|
MediaWiki master
|
A service which loads shadow content, which is content that is displayed on a nonexistent page with a valid can-exist title. More...
Public Member Functions | |
| __construct (private ObjectFactory $objectFactory, private array $coreSpecs, private array $extensionSpecs) | |
| existsForLink (LinkTarget $link) | |
| Check if a link should be shown as existing, due to the existence of shadow content at that location. | |
| get (PageReference $title) | |
| Try to get a ShadowPage for the given title. | |
| getExtensionProvider (string $className) | |
| Get an extension provider with a given class name, or throw if no such provider exists. | |
| getMessageProvider () | |
| Get the MessageProvider instance. | |
Public Attributes | |
| const | CORE_SPECS |
A service which loads shadow content, which is content that is displayed on a nonexistent page with a valid can-exist title.
For example, pages in the MediaWiki namespace show the default message text.
A container and factory for ShadowPageProvider instances.
Definition at line 19 of file ShadowPageLoader.php.
| MediaWiki\ShadowPage\ShadowPageLoader::__construct | ( | private ObjectFactory | $objectFactory, |
| private array | $coreSpecs, | ||
| private array | $extensionSpecs ) |
| ObjectFactory | $objectFactory | |
| array | $coreSpecs | Should be self::CORE_SPECS except while testing |
| array | $extensionSpecs | Array of associative arrays. The keys "class", "factory", "args", "services" and "optional_services" are passed down to ObjectFactory. The following additional keys are recognised:
|
Definition at line 60 of file ShadowPageLoader.php.
| MediaWiki\ShadowPage\ShadowPageLoader::existsForLink | ( | LinkTarget | $link | ) |
Check if a link should be shown as existing, due to the existence of shadow content at that location.
Definition at line 83 of file ShadowPageLoader.php.
| MediaWiki\ShadowPage\ShadowPageLoader::get | ( | PageReference | $title | ) |
Try to get a ShadowPage for the given title.
Definition at line 70 of file ShadowPageLoader.php.
Referenced by MediaWiki\Parser\Parser\defaultFetchTemplate().
| MediaWiki\ShadowPage\ShadowPageLoader::getExtensionProvider | ( | string | $className | ) |
Get an extension provider with a given class name, or throw if no such provider exists.
To get a core provider, use the relevant accessor such as getMessageProvider().
Definition at line 114 of file ShadowPageLoader.php.
| MediaWiki\ShadowPage\ShadowPageLoader::getMessageProvider | ( | ) |
Get the MessageProvider instance.
Definition at line 95 of file ShadowPageLoader.php.
References NS_MEDIAWIKI.
| const MediaWiki\ShadowPage\ShadowPageLoader::CORE_SPECS |
Definition at line 20 of file ShadowPageLoader.php.