/** * Dispatch event. * * @param FilterCollection $filters Any filters to be used in subqueries. * * @return ReportEvent */ protected function _dispatchEvent(FilterCollection $filters = null) { $event = new ReportEvent(); if ($filters) { $event->setFilters($filters); } return $this->_eventDispatcher->dispatch(Events::TRANSACTIONS_REPORT, $event); }
/** * Apply filters to subscriber * * @param ReportEvents\ReportEvent $event */ public function applySubscriberReportFilters(ReportEvents\ReportEvent $event) { foreach ($event->getQueryBuilders() as $queryBuilder) { foreach ($event->getFilters() as $filter) { if ($filter instanceof ModifyQueryInterface) { $filter->apply($queryBuilder); } } } }
private function _dispatchEvent() { $event = new ReportEvent(); $event->setFilters($this->_filters); $event->addQueryBuilder($this->_queryBuilder); $this->_dispatcher->dispatch(Events::USER_SUMMARY_REPORT, $event); }
/** * Builds the Transaction report. * * @param ReportEvents\ReportEvent $event */ public function buildTransactionReport(ReportEvents\ReportEvent $event) { foreach ($this->get('commerce.report.transaction-data') as $query) { if ($query instanceof FilterableInterface) { $query->setFilters($event->getFilters()); } $event->addQueryBuilder($query->getQueryBuilder()); } }
/** * Dispatch effect to apply filters */ private function _dispatchEvent() { $event = new ReportEvent(); $event->setFilters($this->_filters); $event->addQueryBuilder($this->_queryBuilder); $this->_dispatcher->dispatch(self::MAILING_SUBSCRIBER_REPORT, $event); }
public function buildTransactionReport(ReportEvents\ReportEvent $event) { foreach ($this->get('return.report.transaction-data') as $query) { $event->addQueryBuilder($query->setFilters($event->getFilters())->getQueryBuilder()); } }