[CONTROLLER][FeedController] Make post processing happen more automatically, reducing noise in individual controllers. Now it's enough to simply extends App\Core\Controller\FeedController, to implement a feed

This commit is contained in:
2021-12-08 10:20:37 +00:00
parent 7783922b2e
commit 3b8a3e953d
6 changed files with 27 additions and 17 deletions

View File

@@ -36,10 +36,10 @@ class Directory extends FeedController
*/
public function actors(Request $request): array
{
return $this->process_feed([
return [
'_template' => 'directory/actors.html.twig',
'actors' => DB::dql('select a from actor a order by a.nickname ASC'),
]);
];
}
/**
@@ -49,9 +49,9 @@ class Directory extends FeedController
*/
public function groups(Request $request): array
{
return $this->process_feed([
return [
'_template' => 'directory/groups.html.twig',
'groups' => DB::dql('select g from group g order by g.nickname ASC'),
]);
];
}
}