/**
  * A convenience method for embedding collections.
  * 
  * @param BaseFormDoctrine $form
  * @param string $formName
  * @param string $relationAlias
  * @param array $options
  * @return void
  */
 private static function embedCollection(BaseFormDoctrine $form, $formName, $relationAlias, array $options)
 {
     // set required options
     $options['parent_object'] = $form->getObject();
     $options['relation_alias'] = $relationAlias;
     // initialize and embed the collection form
     $collectionForm = new jmsBaseCollectionForm(array(), $options);
     $form->embedForm($formName, $collectionForm);
 }