Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class UpdateForm
- extends BaseUpdateForm
- {
- public function configure()
- {
- $this->useFields( array() );
- $oLanguages = Doctrine::getTable( 'Language' )->getActiveLanguages();
- $oSubForm = new sfForm();
- foreach( $oLanguages AS $iLanguage => $oLanguage )
- {
- $oUpdateTranslation = $this->getObject()->getTranslation()->get( $oLanguage->getId() );
- $oSubForm->embedForm
- (
- $oLanguage->getId(),
- new UpdateTranslationForm( $oUpdateTranslation )
- );
- }
- $this->embedForm( 'translations', $oSubForm )
- }
- }
Add Comment
Please, Sign In to add comment