Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CreateOrEditUserFormFactory extends Nette\Object
- {
- private $foo;
- public function __construct($foo)
- {
- $this->foo = $foo;
- }
- public function createForm()
- {
- $form = new Form;
- ...
- $form->addSubmit('send', 'Update Account');
- $form->addSubmit('sendandview', 'Update Account and continue editing')
- ->onClick[] = $this->process;
- return $form;
- }
- public function createAdminForm()
- {
- $form = $this->createForm();
- $form->addPassword();
- return $form;
- }
- public function process($button)
- {
- ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment