SHOW:
|
|
- or go back to the newest paste.
| 1 | class presenter | |
| 2 | {
| |
| 3 | - | function createComponentMyForm() |
| 3 | + | protected function createComponentMyForm() |
| 4 | {
| |
| 5 | - | return new FormControl; |
| 5 | + | return new MyFormControl; |
| 6 | } | |
| 7 | } | |
| 8 | ||
| 9 | class MyFormControl extends UI\Control | |
| 10 | {
| |
| 11 | - | function createComponentForm() |
| 11 | + | public function render() |
| 12 | {
| |
| 13 | $this->template->form = $this['form']; | |
| 14 | $this->template->setFile(__DIR__ . '/MyFormControl.latte'); | |
| 15 | $this->template->render(); | |
| 16 | } | |
| 17 | ||
| 18 | ||
| 19 | protected function createComponentForm() | |
| 20 | {
| |
| 21 | $form = new UI\Form; | |
| 22 | $form->addText(...); | |
| 23 | return $form; | |
| 24 | } | |
| 25 | } |