Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Nette 3.0 #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
}
},
"require": {
"nette/di" : "^2.4|^2.3",
"nette/forms" : "^2.4|^2.3"
"nette/di" : "^3.0",
"nette/forms" : "^3.0"
},
"require-dev": {
"nette/tester" : "~1.6.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/NotTranslatableRadioList.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class NotTranslatableRadioList extends Nette\Forms\Controls\RadioList
* Just remove translations from each option
* @return Nette\Forms\Helpers
*/
public function getControl()
public function getControl(): Nette\Utils\Html
{
$input = ChoiceControl::getControl();
$items = $this->getItems();
Expand Down
4 changes: 2 additions & 2 deletions src/Controls/NotTranslatableSelectBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class NotTranslatableSelectBox extends Nette\Forms\Controls\SelectBox
* @param array $items [description]
* @param boolean $useKeys [description]
*/
public function setItems(array $items, $useKeys = TRUE)
public function setItems(array $items, bool $useKeys = TRUE)
{
if (!$useKeys) {
$res = array();
Expand All @@ -50,7 +50,7 @@ public function setItems(array $items, $useKeys = TRUE)
* Just remove translations from each option
* @return Nette\Forms\Helpers
*/
public function getControl()
public function getControl(): Nette\Utils\Html
{
$items = $this->getPrompt() === FALSE ? array() : array('' => $this->translate($this->getPrompt()));
foreach ($this->options as $key => $value) {
Expand Down