StatisticManager
class StatisticManager implements BasicEntityManagerInterface
Class StatisticManager is injected as alligator.statistic_manager service. StatisticManager handles the logic for managed entity.
Constants
| WEB_DIR_PATH |
|
| BACKEND_STATISTIC_QUERIES_CACHED_FILENAME |
|
Properties
| protected StatisticRepository | $repository | ||
| protected OrderManager | $orderManager | ||
| protected UserManager | $userManager |
Methods
StatisticManager constructor.
Retrieve data for statistics
Cache all query results to file, and then read from there Cache is done if it is initial load of data for that day
Retrieve data for statistics
Retrieve data for statistics
Load statistics data for graph representation
Load statistics data for graph representation
Find best seller products, limit by $maxResult
Find most viewed products, limit by $maxResult
Find top rated products, limit by $maxResult
Find top products by review, limit by $maxResult
Find and format financial data for graph representation
Find products for month and year
Find last statistics data with pagination
Find order statistics data
Find user information with pagination
Find latest viewed products for specific user
Find most viewed products for specific user
Find all data for OLAP
Details
at line 51
__construct(StatisticRepository $repository, OrderManager $orderManager, UserManager $userManager)
StatisticManager constructor.
at line 64
array
loadGraphData(string|null $currency = null)
Retrieve data for statistics
at line 76
array
retrieveStatisticDataFromFile(string $currency)
Cache all query results to file, and then read from there Cache is done if it is initial load of data for that day
at line 111
array|null
loadOrderDetailsGraphData(string $lastOrderDate)
Retrieve data for statistics
at line 124
array
loadGraphDataForInterval(string $dateFrom, string $dateTo, string|null $currency = null)
Retrieve data for statistics
at line 133
array
loadAllPlatformGraphData()
Load statistics data for graph representation
at line 142
array
loadPlatformPieGraphData()
Load statistics data for graph representation
at line 156
Statistics
saveStatistic(Statistics $statistics)
Persist new statistics
at line 168
array
getBestSeller(int $maxResult)
Find best seller products, limit by $maxResult
at line 179
array
getMostViewed(int $maxResult)
Find most viewed products, limit by $maxResult
at line 190
array|bool
getTopRated(int $maxResult)
Find top rated products, limit by $maxResult
at line 199
array
getTopProducts()
Find top products by review, limit by $maxResult
at line 211
stdClass
getFinancialGraphData(string|DateTime|null $currentDate = null, string|null $currency = null)
Find and format financial data for graph representation
at line 257
array
getProductsForYearAndMonth(string|DateTime|null $currentDate = null, string|null $currency = null)
Find products for month and year
at line 284
array
getDataForLiveActivityLog(int $page = 1, int $offset = 10, array|null $params = null)
Find last statistics data with pagination
at line 295
array
getDataForOrderActivityLog(int $orderId)
Find order statistics data
at line 306
bool
isOrderAlreadyCreated(Order $order)
Has statistics for order
at line 319
array
getUsersByStringParam(int $page = 1, int $offset = 10, string|null $params = null)
Find user information with pagination
at line 331
array
getLatestViewedProductsForUser(int|string $userId, int $numberOfProducts)
Find latest viewed products for specific user
at line 343
array
getMostViewedProductsForUser(int|string $userId, int $numberOfProducts)
Find most viewed products for specific user
at line 354
array
getAddedRemovedProductOlapData()
Find all data for OLAP