PromoProductsManager
class PromoProductsManager extends StatisticManager
Class PromoProductsManager
Constants
| WEB_DIR_PATH |
|
| BACKEND_STATISTIC_QUERIES_CACHED_FILENAME |
|
Properties
| protected PromoProductsRepository | $repository | ||
| protected OrderManager | $orderManager | from StatisticManager | |
| protected UserManager | $userManager | from StatisticManager |
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
No description
No description
No description
Find and format financial data for graph representation
Find products for month and year
Find last statistics data with pagination
Find user information with pagination
Find latest viewed products for specific user
Find most viewed products for specific user
No description
No description
Details
in StatisticManager at line 51
__construct(StatisticRepository $repository, OrderManager $orderManager, UserManager $userManager)
StatisticManager constructor.
in StatisticManager at line 64
array
loadGraphData(string|null $currency = null)
Retrieve data for statistics
in StatisticManager 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
in StatisticManager at line 111
array|null
loadOrderDetailsGraphData(string $lastOrderDate)
Retrieve data for statistics
in StatisticManager at line 124
array
loadGraphDataForInterval(string $dateFrom, string $dateTo, string|null $currency = null)
Retrieve data for statistics
in StatisticManager at line 133
array
loadAllPlatformGraphData()
Load statistics data for graph representation
in StatisticManager at line 142
array
loadPlatformPieGraphData()
Load statistics data for graph representation
in StatisticManager at line 156
Statistics
saveStatistic(Statistics $statistics)
Persist new statistics
at line 23
array
getBestSeller(int $maxResult, array|null $limitData = null)
at line 33
array
getMostViewed(int $maxResult, array|null $limitData = null)
at line 53
array|bool
getTopRated(int $maxResult, array|null $limitData = null)
in StatisticManager at line 199
array
getTopProducts()
Find top products by review, limit by $maxResult
in StatisticManager at line 211
stdClass
getFinancialGraphData(string|DateTime|null $currentDate = null, string|null $currency = null)
Find and format financial data for graph representation
in StatisticManager at line 257
array
getProductsForYearAndMonth(string|DateTime|null $currentDate = null, string|null $currency = null)
Find products for month and year
in StatisticManager at line 284
array
getDataForLiveActivityLog(int $page = 1, int $offset = 10, array|null $params = null)
Find last statistics data with pagination
in StatisticManager at line 295
array
getDataForOrderActivityLog(int $orderId)
Find order statistics data
in StatisticManager at line 306
bool
isOrderAlreadyCreated(Order $order)
Has statistics for order
in StatisticManager at line 319
array
getUsersByStringParam(int $page = 1, int $offset = 10, string|null $params = null)
Find user information with pagination
in StatisticManager at line 331
array
getLatestViewedProductsForUser(int|string $userId, int $numberOfProducts)
Find latest viewed products for specific user
in StatisticManager at line 343
array
getMostViewedProductsForUser(int|string $userId, int $numberOfProducts)
Find most viewed products for specific user
in StatisticManager at line 354
array
getAddedRemovedProductOlapData()
Find all data for OLAP