Created
May 11, 2011 21:27
-
-
Save robzienert/967399 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 FooController extends Zend_Controller_Action | |
| { | |
| public function listAction() | |
| { | |
| $usersAndStuff = $model->getUsersAndStuff(); | |
| $this->view->users = $this->getUsersAndStuff(); | |
| } | |
| public function addAction() | |
| { | |
| $form = new LolForm(); | |
| $request = $this->getRequest(); | |
| if ($request->isPost()) { | |
| if ($form->isValid($request->getPost())) { | |
| // do save stuff. | |
| } | |
| } | |
| $this->view->assign(array( | |
| 'form' => $form, | |
| 'users' => $this->getUsersAndStuff(), | |
| )); | |
| $this->render('list.phtml'); | |
| } | |
| protected function getUsersAndStuff() | |
| { | |
| return $model->findUsersAndStuff(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment