74 }
catch ( InvalidArgumentException $e ) {
77 $list[$gadget->getCategory()][$gadget->getName()] = $gadget;
89 if ( self::$instance ===
null ) {
90 global $wgGadgetsRepoClass;
91 self::$instance =
new $wgGadgetsRepoClass();
102 self::$instance = $repo;
static GadgetRepo null $instance
getGadget( $id)
Get the Gadget object for a given gadget id.
getGadgetIds()
Get the ids of the gadgets provided by this repository.
handlePageUpdate(LinkTarget $target)
Given that the provided page was updated, invalidate caches if necessary.
static singleton()
Get the configured default GadgetRepo.
handlePageDeletion(LinkTarget $target)
Given that the provided page was updated, invalidate caches if necessary.
handlePageCreation(LinkTarget $target)
Given that the provided page was created, invalidate caches if necessary.
getStructuredList()
Get a list of gadgets sorted by category.
static setSingleton( $repo=null)
Should only be used by unit tests.