mirror of
https://github.com/rekryt/iplist.git
synced 2025-10-13 16:59:36 +03:00
feat: portal groups
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user