39 }
catch ( InvalidArgumentException
$e ) {
42 $list[$gadget->getCategory()][$gadget->getName()] = $gadget;
54 if ( self::$instance ===
null ) {
55 global $wgGadgetsRepoClass;
56 self::$instance =
new $wgGadgetsRepoClass();
67 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.
static singleton()
Get the configured default GadgetRepo.
getStructuredList()
Get a list of gadgets sorted by category.
static setSingleton( $repo=null)
Should only be used by unit tests.
returning false will NOT prevent logging $e