From e9d88142670ff21e64e9ad3c147575200841cdeb Mon Sep 17 00:00:00 2001 From: Michal Kalita Date: Sat, 3 Feb 2018 15:43:50 +0100 Subject: [PATCH 1/4] Fixed deprecated HTML::add to HTML::addHtml or HTML::addText --- CheckBoxTree.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CheckBoxTree.php b/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) + ) ); } } From 44a316e4bbcefb9bc7400ed7f46031be629ff52b Mon Sep 17 00:00:00 2001 From: Michal Kalita Date: Sat, 3 Feb 2018 16:03:37 +0100 Subject: [PATCH 2/4] Updated dependencies --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f73999b..91c80ca 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,8 @@ "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" : ""} From d014cf192da6334dd18666cc4c1422e11c3d82a8 Mon Sep 17 00:00:00 2001 From: Michal Kalita Date: Mon, 26 Mar 2018 20:13:26 +0200 Subject: [PATCH 3/4] Changed package name and added author --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 91c80ca..5053de0 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,8 @@ { - "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"], From c69a2950d9fc03394d22d69da423d71e42b0e955 Mon Sep 17 00:00:00 2001 From: Michal Kalita Date: Mon, 26 Mar 2018 20:47:40 +0200 Subject: [PATCH 4/4] Fix autoload --- CheckBoxTree.php => CheckboxTree.php | 0 composer.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename CheckBoxTree.php => CheckboxTree.php (100%) diff --git a/CheckBoxTree.php b/CheckboxTree.php similarity index 100% rename from CheckBoxTree.php rename to CheckboxTree.php diff --git a/composer.json b/composer.json index 5053de0..59d6650 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,6 @@ "nette/utils": "^2.3" }, "autoload": { - "psr-0": {"krejcon3" : ""} + "psr-4": {"krejcon3\\" : "/"} } } \ No newline at end of file