chyba doplnku FormMultiplier
- Taps
- Člen | 168
Zdravím, používám doplněk contributte/forms-multiplier. V presenteru mám níže uvedené ale zobrazuje se mi chyba Contributte\FormMultiplier\Multiplier::getContainers(): Return value must be of type Iterator, array returned
Mohl by mi prosím někdo poradit, kde by mohl být problém? Děkuji
Presenter
protected function createComponentFormSigner(): Form
{
$form = new Form;
$copies = 1;
$maxCopies = 10;
$multiplier = $form->addMultiplier('multiplier', function (Nette\Forms\Container $container, \Nette\Forms\Form $form){
$people = $this->userdb->getUsers()->fetchPairs('login','uzivatel');
$container->addSelect('recipient', 'Příjemce',$people)
->setPrompt('Vyberte uživatele');
}, $copies, $maxCopies);
$multiplier->addCreateButton('Přidat uživatele')
->addClass('btn btn-primary');
$multiplier->addRemoveButton('Odebrat uživatele')
->addClass('btn btn-danger');
$form->addSubmit('send', 'Odeslat k podpisu');
$form->onSuccess[] = [$this, 'signerFormSucceeded'];
return $form;
}
- Taps
- Člen | 168
Přikládám ještě soubor composer.json
{
"name": "nette/web-project",
"description": "Nette: Standard Web Project",
"keywords": ["nette"],
"type": "project",
"license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
"require": {
"php": ">= 8.0",
"nette/application": "^3.1",
"nette/bootstrap": "^3.2",
"nette/caching": "^3.2",
"nette/database": "^3.1",
"nette/di": "^3.1",
"nette/forms": "^3.1",
"nette/http": "^3.2",
"nette/mail": "^4.0",
"nette/robot-loader": "^4.0",
"nette/security": "^3.1",
"nette/utils": "^4.0",
"latte/latte": "^3.0",
"tracy/tracy": "^2.9",
"contributte/forms-multiplier": "^4.0"
},
"require-dev": {
"nette/tester": "^2.4",
"symfony/thanks": "^1"
},
"autoload": {
"psr-4": {
"App\\": "app"
}
},
"minimum-stability": "stable",
"config": {
"allow-plugins": {
"symfony/thanks": true
}
}
}
- Alsatian
- Člen | 175
Ahoj, taky mě to píše chybičky na Nette Latte 3 :)
Declaration of Contributte\FormMultiplier\Multiplier::setValues($values, bool
$erase = false): Contributte\FormMultiplier\Multiplier must be compatible with
Nette\Forms\Container::setValues(object|array $data, bool $erase =
false): static
Snad to někdo šikovný opraví :) Předem děkuji.