reverted FML update

This commit is contained in:
Jocy
2017-05-12 20:04:50 +02:00
parent e816961d28
commit 640d285c78
9 changed files with 18 additions and 28 deletions

View File

@ -13,6 +13,7 @@ use FML\Types\ScriptFeatureable;
/**
* CheckBox Component
*
* @uses Quad
* @author steeffeen <mail@steeffeen.com>
* @copyright FancyManiaLinks Copyright © 2017 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -73,8 +74,6 @@ class CheckBox implements Renderable, ScriptFeatureable
public function setName($name)
{
$this->name = (string)$name;
$this->getEntry()
->setName($this->name);
return $this;
}
@ -222,7 +221,6 @@ class CheckBox implements Renderable, ScriptFeatureable
*
* @param Entry $entry Hidden Entry
* @return static
* @deprecated
*/
public function setEntry(Entry $entry)
{
@ -238,11 +236,9 @@ class CheckBox implements Renderable, ScriptFeatureable
protected function createEntry()
{
$entry = new Entry();
$entry->setVisible(false);
if ($this->name) {
$entry->setName($this->name);
}
$this->feature->setEntry($entry);
$entry->setVisible(false)
->setName($this->name);
$this->setEntry($entry);
return $entry;
}
@ -251,7 +247,7 @@ class CheckBox implements Renderable, ScriptFeatureable
*/
public function getScriptFeatures()
{
return ScriptFeature::collect($this->feature, $this->getQuad(), $this->getEntry());
return ScriptFeature::collect($this->feature, $this->getQuad(), $this->feature->getEntry());
}
/**