HosipLan

Untitled

May 31st, 2011
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. namespace NoobDB\Control\Form;
  2.  
  3. use Doctrine\ORM\EntityManager;
  4. use NoobDb
  5.  
  6. class AddNoobForm extends BaseForm
  7. {
  8.     /** @var EntityManager */
  9.     private $em;
  10.  
  11.     private $redirectPresenter = ':Report:success';
  12.     private $resultText = ' was succesfuly added to database and will be reviewed by administrators!';
  13.  
  14.  
  15.  
  16.     public function  __construct(EntityManager $em)
  17.     {
  18.         parent::__construct(NULL, NULL);
  19.         $this->em = $em;
  20.     }
  21.  
  22.     // ...
  23.  
  24. }
  25.  
  26. //presenter
  27.  
  28. protected function createComponentAddNoobForm($name)
  29. {
  30.     return new NoobDB\Control\Form\AddNoobForm($this->context->doctrine->entityManager);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment