Updated FML to newest version

This commit is contained in:
Jocy
2017-04-02 16:32:57 +02:00
parent 83710a9269
commit c5926aded2
21 changed files with 1425 additions and 995 deletions

View File

@ -3,6 +3,7 @@
namespace FML\Controls;
use FML\Elements\Format;
use FML\Stylesheet\Style;
use FML\Types\Container;
use FML\Types\Renderable;
use FML\Types\ScriptFeatureable;
@ -25,6 +26,7 @@ class Frame extends Control implements Container
/**
* @var Format $format Format
* @deprecated
*/
protected $format = null;
@ -37,8 +39,8 @@ class Frame extends Control implements Container
}
/**
* @see Container::addChild()
* @deprecated use addChild() instead
* @deprecated Use addChild()
* @see Frame::addChild()
*/
public function add(Renderable $child)
{
@ -67,6 +69,15 @@ class Frame extends Control implements Container
return $this;
}
/**
* @deprecated Use removeAllChildren()
* @see Frame::removeAllChildren()
*/
public function removeChildren()
{
return $this->removeAllChildren();
}
/**
* @see Container::removeAllChildren()
*/
@ -77,15 +88,20 @@ class Frame extends Control implements Container
}
/**
* @see Container::getFormat()
* @deprecated Use Style
* @see Style
*/
public function getFormat()
public function getFormat($createIfEmpty = true)
{
if (!$this->format && $createIfEmpty) {
$this->setFormat(new Format());
}
return $this->format;
}
/**
* @see Container::setFormat()
* @deprecated Use Style
* @see Style
*/
public function setFormat(Format $format = null)
{