Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
fiktivkod/application/modules/blog/controllers/IndexController.php
Fredric N 359e42a44b BFC
2010-09-19 16:08:43 +02:00

29 lines
574 B
PHP

<?php
class Blog_IndexController extends Fiktiv_Controller_Action
{
public function indexAction()
{
$this->_forward('latest');
}
public function latestAction()
{
$this->view->posts = $this->dataService->BlogPost->findAll();
}
public function archiveAction()
{
}
public function readAction()
{
$this->view->post = $this->dataService->BlogPost->findById($this->_getParam('id', null));
if (!$this->view->post)
$this->_redirect(array('action' => 'latest'));
}
}