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
2010-10-02 15:35:34 +02:00

30 lines
609 B
PHP

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