Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // symfony 1.4.10-DEV
- // sfFormObject.class.php : line ~ 229
- public function saveEmbeddedForms($con = null, $forms = null)
- {
- if (null === $con)
- {
- $con = $this->getConnection();
- }
- if (null === $forms)
- {
- $forms = $this->embeddedForms;
- }
- foreach ($forms as $form)
- {
- if ($form instanceof sfFormObject)
- {
- $form->saveEmbeddedForms($con);
- $form->getObject()->save($con);
- }
- else
- {
- $this->saveEmbeddedForms($con, $form->getEmbeddedForms());
- }
- }
- }
- //
- // I dont understand why
- //
- // $form->saveEmbeddedForms($con);
- // $form->getObject()->save($con);
- // instead of
- //
- // $form->save($con);
- public function saveEmbeddedForms($con = null, $forms = null)
- {
- if (null === $con)
- {
- $con = $this->getConnection();
- }
- if (null === $forms)
- {
- $forms = $this->embeddedForms;
- }
- foreach ($forms as $form)
- {
- if ($form instanceof sfFormObject)
- {
- $form->save($con);
- }
- else
- {
- $this->saveEmbeddedForms($con, $form->getEmbeddedForms());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment