26 lines
No EOL
596 B
PHP
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']);
|
|
|
|
}
|
|
|
|
}
|
|
} |