DashboardController
extends AbstractController
in package
Attributes
- #[IsGranted]
- 'IS_AUTHENTICATED_FULLY'
Table of Contents
Properties
- $api_base_url : string
Methods
- __construct() : mixed
- getBusinessCreationsGraphData() : array<string|int, mixed>
- Retrieves the business creations graph data.
- index() : Response
Properties
$api_base_url
private
string
$api_base_url
Methods
__construct()
public
__construct(string $api_base_url) : mixed
Parameters
- $api_base_url : string
getBusinessCreationsGraphData()
Retrieves the business creations graph data.
public
getBusinessCreationsGraphData(UserRepository $businessRepository) : array<string|int, mixed>
This method fetches the monthly business creation data from the UserRepository, groups the data by year and month, and returns it in a format suitable for graphing.
Parameters
- $businessRepository : UserRepository
-
The repository to fetch business creation data from.
Return values
array<string|int, mixed> —An associative array containing 'labels' and 'data' keys:
- 'labels': An array of year-month strings representing the labels for the graph.
- 'data': An array of integers representing the count of business creations for each corresponding label.
index()
public
index(EntityManagerInterface $entityManager, BusinessRepository $businessRepository, PaymentRepository $paymentRepository, UserRepository $userRepository) : Response
Parameters
- $entityManager : EntityManagerInterface
- $businessRepository : BusinessRepository
- $paymentRepository : PaymentRepository
- $userRepository : UserRepository
Attributes
- #[Route]
- '/dashboard'
- $name: 'app_dashboard'