custom ui rendering improved

This commit is contained in:
Steffen Schröder 2013-12-31 11:37:03 +01:00
parent 283f6d8fcd
commit 233c8824a5

View File

@ -2,7 +2,6 @@
namespace ManiaControl\Manialinks;
use FML\CustomUI;
use ManiaControl\ManiaControl;
use ManiaControl\Callbacks\CallbackListener;
@ -10,7 +9,6 @@ use ManiaControl\Callbacks\CallbackManager;
use ManiaControl\Players\Player;
use ManiaControl\Players\PlayerManager;
/**
* Class managing the Custom UI Settings
*
@ -58,11 +56,7 @@ class CustomUIManager implements CallbackListener {
* @param Player $player
*/
private function updateManialink(Player $player = null) {
// TODO: improve rendering after FML update
$domDocument = new \DOMDocument();
$element = $this->customUI->render($domDocument);
$domDocument->appendChild($element);
$manialinkText = $domDocument->saveXML();
$manialinkText = $this->customUI->render()->saveXML();
if ($player) {
$this->maniaControl->manialinkManager->sendManialink($manialinkText, $player->login);
return;