◆ __construct()
- Parameters
-
ResolverInterface | $localeResolver | |
TimezoneInterface | $timezone | |
\Magento\Sales\Model\ResourceModel\Report\BestsellersFactory | $bestsellersFactory | |
Definition at line 36 of file AggregateSalesReportBestsellersData.php.
42 $this->localeDate = $timezone;
◆ execute()
Refresh bestsellers report statistics for last day
- Returns
- void
Definition at line 51 of file AggregateSalesReportBestsellersData.php.
53 $this->localeResolver->emulate(0);
54 $currentDate = $this->localeDate->date();
55 $date = $currentDate->sub(
new \DateInterval(
'PT25H'));
56 $this->bestsellersFactory->create()->aggregate($date);
57 $this->localeResolver->revert();
◆ $bestsellersFactory
◆ $localeDate
◆ $localeResolver
The documentation for this class was generated from the following file: