mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
fix handling of DirectExportInterface
This commit is contained in:
@@ -113,8 +113,12 @@ class ExportManager
|
||||
*
|
||||
* @return FilterInterface[] a \Generator that contains filters. The key is the filter's alias
|
||||
*/
|
||||
public function &getFiltersApplyingOn(ExportInterface $export, ?array $centers = null)
|
||||
public function &getFiltersApplyingOn(ExportInterface|DirectExportInterface $export, ?array $centers = null): iterable
|
||||
{
|
||||
if ($export instanceof DirectExportInterface) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($this->filters as $alias => $filter) {
|
||||
if (
|
||||
in_array($filter->applyOn(), $export->supportsModifiers(), true)
|
||||
@@ -132,9 +136,9 @@ class ExportManager
|
||||
*
|
||||
* @return null|iterable<string, AggregatorInterface> a \Generator that contains aggretagors. The key is the filter's alias
|
||||
*/
|
||||
public function &getAggregatorsApplyingOn(ExportInterface $export, ?array $centers = null): ?iterable
|
||||
public function &getAggregatorsApplyingOn(ExportInterface|DirectExportInterface $export, ?array $centers = null): ?iterable
|
||||
{
|
||||
if ($export instanceof ListInterface) {
|
||||
if ($export instanceof ListInterface || $export instanceof DirectExportInterface) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user