Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class presenter
- {
- protected function createComponentMyForm()
- {
- return new MyFormControl;
- }
- }
- class MyFormControl extends UI\Control
- {
- public function render()
- {
- $this->template->form = $this['form'];
- $this->template->setFile(__DIR__ . '/MyFormControl.latte');
- $this->template->render();
- }
- protected function createComponentForm()
- {
- $form = new UI\Form;
- $form->addText(...);
- return $form;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment