File tree Expand file tree Collapse file tree 6 files changed +86
-1
lines changed Expand file tree Collapse file tree 6 files changed +86
-1
lines changed Original file line number Diff line number Diff line change 2222 "require-dev" : {
2323 "phpunit/phpunit" : " ^9.0" ,
2424 "ezsystems/ezplatform-code-style" : " ^0.3" ,
25+ "ezsystems/ezplatform-solr-search-engine" : " ^3.3" ,
2526 "friendsofphp/php-cs-fixer" : " ^2.16" ,
2627 "phpstan/phpstan-phpunit" : " ^0.12.17" ,
2728 "symfony/maker-bundle" : " ^1.31"
Original file line number Diff line number Diff line change @@ -33,14 +33,20 @@ public function prepend(ContainerBuilder $container): void
3333
3434 $ container ->addResource (new FileResource ($ configFile ));
3535 foreach (Yaml::parseFile ($ configFile ) as $ name => $ config ) {
36- $ container ->prependExtensionConfig ($ name , $ config );
36+ if ($ container ->hasExtension ($ name )) {
37+ $ container ->prependExtensionConfig ($ name , $ config );
38+ }
3739 }
3840
3941 $ this ->prependJMSTranslation ($ container );
4042 }
4143
4244 private function prependJMSTranslation (ContainerBuilder $ container ): void
4345 {
46+ if (!$ container ->hasExtension ('jms_translation ' )) {
47+ return ;
48+ }
49+
4450 $ container ->prependExtensionConfig ('jms_translation ' , [
4551 'configs ' => [
4652 'ibexa-formatted-textline ' => [
Original file line number Diff line number Diff line change 44
55namespace AdamWojs \IbexaFormattedTextLineBundle ;
66
7+ use Symfony \Component \Config \FileLocator ;
8+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
9+ use Symfony \Component \DependencyInjection \Loader \YamlFileLoader ;
710use Symfony \Component \HttpKernel \Bundle \Bundle ;
811
912final class IbexaFormattedTextLineBundle extends Bundle
1013{
14+ public function build (ContainerBuilder $ container )
15+ {
16+ parent ::build ($ container );
17+
18+ $ loader = new YamlFileLoader (
19+ $ container ,
20+ new FileLocator (__DIR__ . '/Resources/config ' )
21+ );
22+
23+ if ($ container ->hasExtension ('ez_search_engine_solr ' )) {
24+ $ loader ->load ('services_solr.yaml ' );
25+ }
26+
27+ if ($ container ->hasExtension ('ezplatform_elastic_search_engine ' )) {
28+ $ loader ->load ('services_es.yaml ' );
29+ }
30+ }
1131}
Original file line number Diff line number Diff line change 1+ services :
2+ _defaults :
3+ autowire : true
4+ autoconfigure : true
5+ public : false
6+
7+ ezplatform.search.elasticsearch.query.common.aggregation_visitor.field.formatted_textline_term :
8+ class : Ibexa\Platform\ElasticSearchEngine\Query\AggregationVisitor\TermAggregationVisitor
9+ factory : ['@Ibexa\Platform\ElasticSearchEngine\Query\AggregationVisitor\Factory\ContentFieldAggregationVisitorFactory', 'createTermAggregationVisitor']
10+ arguments :
11+ $aggregationClass : ' AdamWojs\IbexaFormattedTextLineBundle\Search\Query\Aggregation\FormattedTextLineTermAggregation'
12+ $searchIndexFieldName : ' value'
13+ tags :
14+ - { name: ezplatform.search.elasticsearch.query.content.aggregation_visitor }
15+ - { name: ezplatform.search.elasticsearch.query.location.aggregation_visitor }
16+
17+ ezplatform.search.elasticsearch.query.common.aggregation_result_extractor.field.formatted_textline_term :
18+ class : Ibexa\Platform\ElasticSearchEngine\Query\ResultExtractor\AggregationResultExtractor\TermAggregationResultExtractor
19+ arguments :
20+ $aggregationClass : ' AdamWojs\IbexaFormattedTextLineBundle\Search\Query\Aggregation\FormattedTextLineTermAggregation'
21+ tags :
22+ - { name: ezplatform.search.elasticsearch.query.content.aggregation_result_extractor }
23+ - { name: ezplatform.search.elasticsearch.query.location.aggregation_result_extractor }
24+
Original file line number Diff line number Diff line change 1+ services :
2+ _defaults :
3+ autowire : true
4+ autoconfigure : true
5+ public : false
6+
7+ ezplatform.search.solr.query.common.aggregation_visitor.field.formatted_textline_term :
8+ class : EzSystems\EzPlatformSolrSearchEngine\Query\Common\AggregationVisitor\TermAggregationVisitor
9+ factory : ['@EzSystems\EzPlatformSolrSearchEngine\Query\Common\AggregationVisitor\Factory\ContentFieldAggregationVisitorFactory', 'createTermAggregationVisitor']
10+ arguments :
11+ $aggregationClass : ' AdamWojs\IbexaFormattedTextLineBundle\Search\Query\Aggregation\FormattedTextLineTermAggregation'
12+ $searchIndexFieldName : ' value'
13+ tags :
14+ - { name: ezplatform.search.solr.query.content.aggregation_visitor }
15+ - { name: ezplatform.search.solr.query.location.aggregation_visitor }
16+
17+ ezplatform.search.solr.query.common.aggregation_result_extractor.field.formatted_textline_term :
18+ class : EzSystems\EzPlatformSolrSearchEngine\ResultExtractor\AggregationResultExtractor\TermAggregationResultExtractor
19+ arguments :
20+ $aggregationClass : ' AdamWojs\IbexaFormattedTextLineBundle\Search\Query\Aggregation\FormattedTextLineTermAggregation'
21+ tags :
22+ - { name: ezplatform.search.solr.query.content.aggregation_result_extractor }
23+ - { name: ezplatform.search.solr.query.location.aggregation_result_extractor }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace AdamWojs \IbexaFormattedTextLineBundle \Search \Query \Aggregation ;
6+
7+ use eZ \Publish \API \Repository \Values \Content \Query \Aggregation \Field \AbstractFieldTermAggregation ;
8+
9+ final class FormattedTextLineTermAggregation extends AbstractFieldTermAggregation
10+ {
11+ }
You can’t perform that action at this time.
0 commit comments