Created
May 27, 2011 12:48
-
-
Save garak/995163 to your computer and use it in GitHub Desktop.
controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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