🎉 initial commit

This commit is contained in:
2024-10-07 22:58:27 +02:00
commit d3eccf99f0
824 changed files with 16401 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Application\Controller;
use Application\Generator\Article;
use Application\Helper\NumberHash;
use Exception;
class HomeController extends MainController
{
/**
* @throws Exception
*/
protected function action(): void
{
$this->pushToStash('articles', $this->generateArticles());
}
private function generateArticles(): array
{
$return = [];
for ($i = 0; $i < 10; $i++) {
$return[] = (new Article(NumberHash::numHash("home_$i")))->getTeaserData();
}
return $return;
}
protected function getTemplate(): string
{
return '04_templates/t-home/t-home.twig';
}
}