Archived
1
0
Fork 0

Some work on the admin module

This commit is contained in:
Fredric N 2010-10-30 13:48:46 +02:00
parent a54fef3f64
commit 2dd98c8253
5 changed files with 50 additions and 1 deletions

View file

@ -0,0 +1,26 @@
<?php
class Admin_BlogController extends Fiktiv_Controller_Action
{
public function indexAction()
{
$form = $this->view->form = $this->_getCreateForm();
if ($this->_request->isPost() && $form->isValid($this->_request->getPost())) {
$this->_savePost($form);
}
}
private function _savePost($form)
{
$post = new BlogPost($form->getValues());
//$this->dataService->BlogPost->save($post);
Zend_Debug::dump($post);
}
protected function _getCreateForm()
{
require_once APPLICATION_PATH . '/forms/Admin_BlogCreate.php';
return new Admin_BlogCreate();
}
}