Index: branches/RL2/extensions/Gadgets/backend/Gadget.php |
— | — | @@ -78,11 +78,19 @@ |
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
| 82 | + * Retrieve the metadata of this gadget, in the same format as $properties in __construct() |
| 83 | + * @return array |
| 84 | + */ |
| 85 | + public function getMetadata() { |
| 86 | + return array( 'settings' => $this->settings, 'module' => $this->moduleData ); |
| 87 | + } |
| 88 | + |
| 89 | + /** |
82 | 90 | * Retrieve the JSON representation of this gadget, in the same format as $properties in __construct(). |
83 | 91 | * @return string JSON |
84 | 92 | */ |
85 | 93 | public function getJSON() { |
86 | | - return FormatJson::encode( array( 'settings' => $this->settings, 'module' => $this->moduleData ) ); |
| 94 | + return FormatJson::encode( $this->getMetadata() ); |
87 | 95 | } |
88 | 96 | |
89 | 97 | /** |