for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace eXpansion\Framework\Core\Model\Gui;
use eXpansion\Framework\Core\Model\Data\DataStorageTrait;
use eXpansion\Framework\Core\Model\UserGroups\Group;
use FML\Types\Renderable;
class Manialink implements ManialinkInterface
{
use DataStorageTrait;
/** @var string */
protected $id;
protected $name;
/** @var Group */
protected $group;
/** @var float */
protected $sizeX;
protected $sizeY;
protected $posX;
protected $posY;
/**
* Manialive constructor.
* @param Group $group
*/
public function __construct(
Group $group,
$name,
$sizeX,
$sizeY,
$posX = null,
$posY = null
) {
$this->group = $group;
$this->name = $name;
$this->sizeX = $sizeX;
$this->sizeY = $sizeY;
$this->posX = $posX;
$this->posY = $posY;
$this->id = uniqid("ml_", true); // originally: $this->id = spl_object_hash($this)... change back if needed
}
*
* @return string
public function getXml()
return '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'
.'<manialink version="3" id="'.$this->getId().'">'
.'<label text="Hello World!" />'
.'</manialink>';
* @return Group
public function getUserGroup()
return $this->group;
public function getId()
return $this->id;
* @inheritdoc
public function addChild(Renderable $child)
public function getChildren()
public function removeChild(Renderable $child)
public function getContentFrame()