feat: portal groups

This commit is contained in:
Rekryt
2024-09-05 00:54:41 +03:00
parent f5a036c89e
commit 73b38ec96b
5 changed files with 69 additions and 23 deletions

View File

@@ -2,12 +2,25 @@
namespace OpenCCK\App\Controller;
use OpenCCK\Domain\Entity\Site;
use OpenCCK\Domain\Factory\SiteFactory;
class MainController extends AbstractIPListController {
/**
* @var array<string, array<string, Site>>
*/
private array $groups = [];
/**
* @return string
*/
public function getBody(): string {
$this->setHeaders(['content-type' => 'text/html; charset=utf-8']);
foreach ($this->service->sites as $siteEntity) {
$this->groups[$siteEntity->group][$siteEntity->name] = $siteEntity;
}
return $this->renderTemplate('index');
}