refactored admin stuff into own class

This commit is contained in:
tracer 2022-10-23 18:49:30 +02:00
parent 6284918056
commit a88e861792
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
<?php
/*
* Copyright (c) 2022. Micha Espey <tracer@24unix.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace App\Controller;
use App\Entity\User;
use App\Service\Template;
use App\Repository\UserRepository;
class AddressBookController
{
public function __construct(
private readonly Template $template,
private readonly User $user,
private readonly UserRepository $userRepository
)
{
}
public function main(): void
{
$this->template->render(templateName: 'index.html.php', vars: [
'user' => $this->user
]);
}
}