MediaWiki
1.34.0
|
Public Member Functions | |
getGadget ( $id) | |
Get the Gadget object for a given gadget id. More... | |
getGadgetIds () | |
Get the ids of the gadgets provided by this repository. More... | |
getStructuredList () | |
Get a list of gadgets sorted by category. More... | |
handlePageCreation (LinkTarget $target) | |
Given that the provided page was created, invalidate caches if necessary. More... | |
handlePageDeletion (LinkTarget $target) | |
Given that the provided page was updated, invalidate caches if necessary. More... | |
handlePageUpdate (LinkTarget $target) | |
Given that the provided page was updated, invalidate caches if necessary. More... | |
Static Public Member Functions | |
static | setSingleton ( $repo=null) |
Should only be used by unit tests. More... | |
static | singleton () |
Get the configured default GadgetRepo. More... | |
Static Private Attributes | |
static GadgetRepo null | $instance |
Definition at line 5 of file GadgetRepo.php.
|
abstract |
Get the Gadget object for a given gadget id.
string | $id |
InvalidArgumentException |
Reimplemented in GadgetDefinitionNamespaceRepo, and MediaWikiGadgetsDefinitionRepo.
Referenced by getStructuredList().
|
abstract |
Get the ids of the gadgets provided by this repository.
It's possible this could be out of sync with what getGadget() will return due to caching
Reimplemented in GadgetDefinitionNamespaceRepo, and MediaWikiGadgetsDefinitionRepo.
Referenced by getStructuredList().
GadgetRepo::getStructuredList | ( | ) |
Get a list of gadgets sorted by category.
Definition at line 69 of file GadgetRepo.php.
References getGadget(), and getGadgetIds().
GadgetRepo::handlePageCreation | ( | LinkTarget | $target | ) |
Given that the provided page was created, invalidate caches if necessary.
LinkTarget | $target |
Reimplemented in GadgetDefinitionNamespaceRepo.
Definition at line 50 of file GadgetRepo.php.
GadgetRepo::handlePageDeletion | ( | LinkTarget | $target | ) |
Given that the provided page was updated, invalidate caches if necessary.
LinkTarget | $target |
Reimplemented in GadgetDefinitionNamespaceRepo.
Definition at line 61 of file GadgetRepo.php.
GadgetRepo::handlePageUpdate | ( | LinkTarget | $target | ) |
Given that the provided page was updated, invalidate caches if necessary.
LinkTarget | $target |
Reimplemented in GadgetDefinitionNamespaceRepo, and MediaWikiGadgetsDefinitionRepo.
Definition at line 39 of file GadgetRepo.php.
|
static |
Should only be used by unit tests.
GadgetRepo | null | $repo |
Definition at line 101 of file GadgetRepo.php.
Referenced by GadgetHooksTest\tearDown(), and GadgetHooksTest\testPreferences().
|
static |
Get the configured default GadgetRepo.
Definition at line 88 of file GadgetRepo.php.
References $instance.
Referenced by GadgetHooks\beforePageDisplay(), GadgetDefinitionSecondaryDataUpdate\doUpdate(), GadgetDefinitionDeletionUpdate\doUpdate(), GadgetResourceLoaderModule\getGadget(), ApiQueryGadgetCategories\getList(), ApiQueryGadgets\getList(), GadgetHooks\getPreferences(), GadgetHooks\onPageContentInsertComplete(), GadgetHooks\onPageContentSaveComplete(), SpecialGadgetUsage\outputResults(), GadgetHooks\registerModules(), SpecialGadgets\showExportForm(), SpecialGadgets\showMainForm(), and GadgetHooks\userGetDefaultOptions().
|
staticprivate |
Definition at line 10 of file GadgetRepo.php.
Referenced by singleton().