HosipLan

Untitled

Apr 2nd, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. class BaseForm extends Nette\Application\UI\Form
  2. {
  3.  
  4.     protected function attached($parent)
  5.     {
  6.         parent::attached($parent);
  7.  
  8.         if (!$parent instanceof Nette\Application\UI\Presenter) {
  9.             return;
  10.         }
  11.  
  12.         $this->setTranslator($this->presenter->context->getByType('Nette\Localization\ITranslator'));
  13.     }
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment