DoDomuDojade Documentation

PanelController extends BaseController
in package

Panel controller - handles admin panel views and data aggregation

Tags
author

Franciszek Kruszewski franciszek@kruszew.ski

Table of Contents

Properties

$flash  : FlashMessengerInterface
$renderer  : ViewRendererInterface
$requestContext  : RequestContext
$announcementPresenter  : AnnouncementPresenter
$getAllAnnouncementsUseCase  : GetAllAnnouncementsUseCase
$getAllCountdownsUseCase  : GetAllCountdownsUseCase
$getAllModulesUseCase  : GetAllModulesUseCase
$getAllUsersUseCase  : GetAllUsersUseCase
$logger  : LoggerInterface
$translator  : Translator

Methods

__construct()  : mixed
announcements()  : ResponseInterface
Display announcement management page Shows pending announcements separately from decided ones
countdowns()  : ResponseInterface
Display countdowns management page
index()  : ResponseInterface
Display the main admin panel page with overview
modules()  : ResponseInterface
Display modules management page
users()  : ResponseInterface
Display users management page
flash()  : void
getCurrentUserId()  : int|null
jsonResponse()  : ResponseInterface
JSON response helper
noContentResponse()  : ResponseInterface
No content response helper
redirect()  : ResponseInterface
Redirect to URL
render()  : ResponseInterface
Render view and return as response
buildUsernamesMap()  : array<string|int, mixed>
Build map of user IDs to usernames for display purposes
formatCountdowns()  : array<string|int, mixed>
Format countdown objects for display Ensures consistent date formatting

Properties

Methods

__construct()

public __construct(RequestContext $requestContext, ViewRendererInterface $renderer, FlashMessengerInterface $flash, LoggerInterface $logger, GetAllModulesUseCase $getAllModulesUseCase, GetAllUsersUseCase $getAllUsersUseCase, GetAllCountdownsUseCase $getAllCountdownsUseCase, GetAllAnnouncementsUseCase $getAllAnnouncementsUseCase, Translator $translator, AnnouncementPresenter $announcementPresenter) : mixed
Parameters
$requestContext : RequestContext
$renderer : ViewRendererInterface
$flash : FlashMessengerInterface
$logger : LoggerInterface
$getAllModulesUseCase : GetAllModulesUseCase
$getAllUsersUseCase : GetAllUsersUseCase
$getAllCountdownsUseCase : GetAllCountdownsUseCase
$getAllAnnouncementsUseCase : GetAllAnnouncementsUseCase
$translator : Translator
$announcementPresenter : AnnouncementPresenter

announcements()

Display announcement management page Shows pending announcements separately from decided ones

public announcements() : ResponseInterface
Tags
throws
Exception
Return values
ResponseInterface

countdowns()

Display countdowns management page

public countdowns() : ResponseInterface
Tags
throws
ViewException
throws
Exception
Return values
ResponseInterface

index()

Display the main admin panel page with overview

public index() : ResponseInterface
Tags
throws
Exception
Return values
ResponseInterface

modules()

Display modules management page

public modules() : ResponseInterface
Tags
throws
Exception
Return values
ResponseInterface

users()

Display users management page

public users() : ResponseInterface
Tags
throws
ViewException
throws
Exception
Return values
ResponseInterface

flash()

protected flash(string $key, string $message) : void
Parameters
$key : string
$message : string

jsonResponse()

JSON response helper

protected jsonResponse(int $statusCode, array<string|int, mixed> $data) : ResponseInterface
Parameters
$statusCode : int
$data : array<string|int, mixed>
Return values
ResponseInterface

noContentResponse()

No content response helper

protected noContentResponse([int $statusCode = 204 ]) : ResponseInterface
Parameters
$statusCode : int = 204
Return values
ResponseInterface

redirect()

Redirect to URL

protected redirect(string $location[, int $statusCode = 302 ]) : ResponseInterface
Parameters
$location : string
$statusCode : int = 302
Return values
ResponseInterface

render()

Render view and return as response

protected render(string $view[, array<string|int, mixed> $data = [] ][, int $statusCode = 200 ]) : ResponseInterface
Parameters
$view : string
$data : array<string|int, mixed> = []
$statusCode : int = 200
Return values
ResponseInterface

buildUsernamesMap()

Build map of user IDs to usernames for display purposes

private buildUsernamesMap(array<string|int, mixed> $users) : array<string|int, mixed>
Parameters
$users : array<string|int, mixed>
Return values
array<string|int, mixed>

formatCountdowns()

Format countdown objects for display Ensures consistent date formatting

private formatCountdowns(array<string|int, mixed> $countdowns) : array<string|int, mixed>
Parameters
$countdowns : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results