26 lines
No EOL
662 B
PHP
26 lines
No EOL
662 B
PHP
<?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();
|
|
}
|
|
} |