File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
Resources/config/services Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,9 @@ final class ProductAttributesFinder implements ProductAttributesFinderInterface
22
22
public function __construct (
23
23
private FinderInterface $ attributesFinder ,
24
24
private QueryBuilderInterface $ attributesByTaxonQueryBuilder ,
25
- private string $ taxonsProperty
26
- ) {
25
+ private string $ taxonsProperty ,
26
+ private int $ filterMax = 20 ,
27
+ ) {
27
28
}
28
29
29
30
public function findByTaxon (TaxonInterface $ taxon ): ?array
@@ -34,6 +35,6 @@ public function findByTaxon(TaxonInterface $taxon): ?array
34
35
/** @var AbstractQuery $query */
35
36
$ query = $ this ->attributesByTaxonQueryBuilder ->buildQuery ($ data );
36
37
37
- return $ this ->attributesFinder ->find ($ query , 20 );
38
+ return $ this ->attributesFinder ->find ($ query , $ this -> filterMax );
38
39
}
39
40
}
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ final class ProductOptionsFinder implements ProductOptionsFinderInterface
22
22
public function __construct (
23
23
private FinderInterface $ optionsFinder ,
24
24
private QueryBuilderInterface $ productOptionsByTaxonQueryBuilder ,
25
- private string $ taxonsProperty
25
+ private string $ taxonsProperty ,
26
+ private int $ filterMax = 20
26
27
) {
27
28
}
28
29
@@ -34,6 +35,6 @@ public function findByTaxon(TaxonInterface $taxon): ?array
34
35
/** @var AbstractQuery $query */
35
36
$ query = $ this ->productOptionsByTaxonQueryBuilder ->buildQuery ($ data );
36
37
37
- return $ this ->optionsFinder ->find ($ query , 20 );
38
+ return $ this ->optionsFinder ->find ($ query , $ this -> filterMax );
38
39
}
39
40
}
Original file line number Diff line number Diff line change 23
23
<argument type =" service" id =" fos_elastica.finder.bitbag_option_taxons" />
24
24
<argument type =" service" id =" bitbag_sylius_elasticsearch_plugin.query_builder.product_options_by_taxon" />
25
25
<argument >%bitbag_es_shop_option_taxons_property%</argument >
26
+ <argument >%bitbag_es_filter_options_max%</argument >
26
27
</service >
27
28
28
29
<service id =" bitbag_sylius_elasticsearch_plugin.finder.product_attributes" class =" BitBag\SyliusElasticsearchPlugin\Finder\ProductAttributesFinder" >
29
30
<argument type =" service" id =" fos_elastica.finder.bitbag_attribute_taxons" />
30
31
<argument type =" service" id =" bitbag_sylius_elasticsearch_plugin.query_builder.product_attributes_by_taxon" />
31
32
<argument >%bitbag_es_shop_attribute_taxons_property%</argument >
33
+ <argument >%bitbag_es_filter_attributes_max%</argument >
32
34
</service >
33
35
</services >
34
36
</container >
Original file line number Diff line number Diff line change 4
4
<parameters >
5
5
<parameter key =" bitbag_es_excluded_filter_options" type =" collection" />
6
6
<parameter key =" bitbag_es_excluded_filter_attributes" type =" collection" />
7
+ <parameter key =" bitbag_es_filter_attributes_max" >20</parameter >
8
+ <parameter key =" bitbag_es_filter_options_max" >20</parameter >
7
9
</parameters >
8
10
9
11
<services >
You can’t perform that action at this time.
0 commit comments