Skip to content

Instantly share code, notes, and snippets.

@garak
Created May 27, 2011 12:48
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 garak/995163 to your computer and use it in GitHub Desktop.
Save garak/995163 to your computer and use it in GitHub Desktop.
controller
<?php
class itemActions extends sfActions
{
/**
* @param sfRequest $request
*/
public function executeIndex(sfWebRequest $request)
{
$this->form = new ItemForm();
if ($request->isMethod(sfRequest::POST))
{
$this->form->bind($request->getParameter($this->form->getName()));
if ($this->form->isValid())
{
// Doctrine
$this->items = StoreTable::getInstance()->search($this->form->getValues());
// Propel
$this->items = StoreQuery::create()->search($this->form->getValues());
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment