Skip to content

Instantly share code, notes, and snippets.

@Janiczek
Created July 23, 2014 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Janiczek/57bba502f8c70e2f76f3 to your computer and use it in GitHub Desktop.
Save Janiczek/57bba502f8c70e2f76f3 to your computer and use it in GitHub Desktop.
Presenter 1: formuláře A, B, C
Presenter 2: formuláře A, D
Presenter 3: formuláře C, E
@fprochazka
Copy link

http://pla.nette.org/cs/best-practise-formulare-jako-komponenty#toc-ui-control

class Presenter1
{
     protected function createComponentA() { return new AFormControl(); }
     protected function createComponentB() { return new BFormControl(); }
     protected function createComponentC() { return new CFormControl(); }
}

class Presenter2
{
     protected function createComponentA() { return new AFormControl(); }
     protected function createComponentD() { return new DFormControl(); }
}

class Presenter3
{
     protected function createComponentC() { return new CFormControl(); }
     protected function createComponentE() { return new EFormControl(); }
}

@Janiczek
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment