diff --git a/CheckBoxTree.php b/CheckboxTree.php similarity index 93% rename from CheckBoxTree.php rename to CheckboxTree.php index e4c7bc4..ee0c023 100755 --- a/CheckBoxTree.php +++ b/CheckboxTree.php @@ -44,17 +44,18 @@ public function getControl() { return $this->recursiveRender($this->getItems()); } - private function recursiveRender($list) { - $html = Html::el("ul"); + private function recursiveRender($list) + { + $html = Html::el('ul'); foreach ($list as $key => $value) { if (is_array($value)) { - $html->add(Html::el("li")->add($this->recursiveRender($value))); + $html->addHtml(Html::el('li')->addHtml($this->recursiveRender($value))); } else { - $html->add(Html::el("li") - ->add($this->getControlPart($key)) - ->add(Html::el("label", array("for" => $this->getHtmlId() . '-' . $key)) - ->add($value) - ) + $html->addHtml(Html::el('li') + ->addHtml($this->getControlPart($key)) + ->addHtml(Html::el('label', array('for' => $this->getHtmlId() . '-' . $key)) + ->addText($value) + ) ); } } diff --git a/composer.json b/composer.json index f73999b..59d6650 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,18 @@ { - "name": "krejcon3/checkboxtree", + "name": "myiyk/checkboxtree", "description": "easy checkboxtree", "authors": [ + {"name": "Michal Kalita", "email": "kalita.michal@gmail.com"}, {"name": "Ondřej Krejčíř", "email": "krejcon3@gmail.com"} ], "keywords":["form", "Nette", "input", "checkbox", "checkboxtree", "tree"], "license": "BSD-3-Clause", "require": { "php": ">=5.3.0", - "nette/nette": "~2.0" + "nette/forms": "^2.2", + "nette/utils": "^2.3" }, "autoload": { - "psr-0": {"krejcon3" : ""} + "psr-4": {"krejcon3\\" : "/"} } } \ No newline at end of file