Some work on the admin module
This commit is contained in:
parent
a54fef3f64
commit
2dd98c8253
5 changed files with 50 additions and 1 deletions
26
application/modules/admin/controllers/BlogController.php
Normal file
26
application/modules/admin/controllers/BlogController.php
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in a new issue