Skip to content

Instantly share code, notes, and snippets.

@delbono
Created September 16, 2010 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delbono/582840 to your computer and use it in GitHub Desktop.
Save delbono/582840 to your computer and use it in GitHub Desktop.
<?php
// ...
protected function processForm(sfWebRequest $request, sfForm $form)
{
$form->bind(
$request->getParameter($form->getName()),
$request->getFiles($form->getName())
);
if ($form->isValid())
{
$values = $form->getValues();
die("Ok");
} else {
throw $form->getErrorSchema();
}
}
public function executeBatch_create(sfWebRequest $request)
{
$this->form = new OrdinativiMenuFoodForm();
$this->processForm($request, $this->form);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment