Guest User

Untitled

a guest
Jul 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2. class UpdateForm
  3. extends BaseUpdateForm
  4. {
  5. public function configure()
  6. {
  7. $this->useFields( array() );
  8.  
  9. $oLanguages = Doctrine::getTable( 'Language' )->getActiveLanguages();
  10.  
  11. $oSubForm = new sfForm();
  12. foreach( $oLanguages AS $iLanguage => $oLanguage )
  13. {
  14. $oUpdateTranslation = $this->getObject()->getTranslation()->get( $oLanguage->getId() );
  15.  
  16. $oSubForm->embedForm
  17. (
  18. $oLanguage->getId(),
  19. new UpdateTranslationForm( $oUpdateTranslation )
  20. );
  21. }
  22. $this->embedForm( 'translations', $oSubForm )
  23. }
  24. }
Add Comment
Please, Sign In to add comment