HosipLan

Untitled

May 24th, 2011
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. class MyComponente extends Nette\Application\UI\Control
  2. {
  3.  
  4.     /** @var Doctrine\ORM\EntityManager */
  5.     private $em;
  6.    
  7.  
  8.  
  9.     public function __construct(Doctrine\ORM\EntityManager $entityManager)
  10.     {
  11.         parent::__construct(NULL, NULL);
  12.         $this->em = $entityManager;
  13.     }
  14.  
  15. }
  16.  
  17.  
  18. # tovarnicka
  19.  
  20. protected function createComponentMy()
  21. {
  22.     return new MyComponent($this->context->doctrine->entityManager);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment