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/ArchiveController.php
2010-10-20 20:33:23 +02:00

26 lines
No EOL
596 B
PHP

<?php
class Blog_ArchiveController extends Fiktiv_Controller_Action
{
public function indexAction()
{
$this->view->postsByMonthYear = $this->dataService->BlogPost->findByMonth();
}
public function filterAction()
{
$params = $this->_getAllParams();
if (array_key_exists('date', $params)) {
$this->view->posts = $this->dataService->BlogPost->findByDate($params['date']);
} else if (array_key_exists('tag', $params)) {
$this->view->posts = $this->dataService->BlogPost->findByTag($params['tag']);
}
}
}