refactored admin stuff into own class
This commit is contained in:
parent
6284918056
commit
a88e861792
33
src/Controller/AddressBookController.php
Normal file
33
src/Controller/AddressBookController.php
Normal 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
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user