improvements on plugin load / unload

This commit is contained in:
kremsy
2014-01-18 10:32:33 +01:00
committed by Steffen Schröder
parent 90b0579c17
commit d173a48159
3 changed files with 13 additions and 2 deletions

View File

@ -124,6 +124,10 @@ class WidgetPlugin implements CallbackListener, Plugin {
* Unload the plugin and its resources
*/
public function unload() {
$this->closeWidget(self::MLID_CLOCKWIDGET);
$this->closeWidget(self::MLID_SERVERINFOWIDGET);
$this->closeWidget(self::MLID_MAPWIDGET);
$this->closeWidget(self::MLID_NEXTMAPWIDGET);
$this->maniaControl->callbackManager->unregisterCallbackListener($this);
unset($this->maniaControl);
}
@ -584,6 +588,6 @@ class WidgetPlugin implements CallbackListener, Plugin {
* @return string
*/
public static function getDescription() {
return null;
return 'Plugin offers some Widgets';
}
}