/** * Password form factory. * @return Nette\Application\UI\Form */ protected function createComponentPasswordForm() { $form = $this->passwordFactory->create($this->user->id); $form->onSuccess[] = function ($form) { $this->flashMessage('Vaše heslo bylo úspěšně změněno.'); $this->redirect('User:profile', $this->user->id); }; return $form; }
public function createComponentFormPassword() { $form = $this->passwordFormFactory->create(); $form->onSuccess[] = array($this, 'passwordFormSucceeded'); return $form; }