Skip to content

Commit

Permalink
IBX-1853: Changed services names to FQCN or rebranded ones
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Jan 19, 2022
1 parent f5afc4e commit 55c2d02
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ class RichTextHtml5ConverterPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
if ($container->hasDefinition('ezrichtext.converter.output.xhtml5')) {
$html5OutputConverterDefinition = $container->getDefinition('ezrichtext.converter.output.xhtml5');
if ($container->hasDefinition('ibexa.richtext.converter.output.xhtml5')) {
$html5OutputConverterDefinition = $container->getDefinition('ibexa.richtext.converter.output.xhtml5');
$taggedOutputServiceIds = $container->findTaggedServiceIds(
'ibexa.field_type.richtext.converter.output.xhtml5'
);
$this->setConverterDefinitions($taggedOutputServiceIds, $html5OutputConverterDefinition);
}

if ($container->hasDefinition('ezrichtext.converter.input.xhtml5')) {
$html5InputConverterDefinition = $container->getDefinition('ezrichtext.converter.input.xhtml5');
if ($container->hasDefinition('ibexa.richtext.converter.input.xhtml5')) {
$html5InputConverterDefinition = $container->getDefinition('ibexa.richtext.converter.input.xhtml5');
$taggedInputServiceIds = $container->findTaggedServiceIds(
'ibexa.field_type.richtext.converter.input.xhtml5'
);
Expand Down
62 changes: 31 additions & 31 deletions src/bundle/Resources/config/fieldtype_services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ parameters:
- '%ezrichtext.resources%/schemas/ezxhtml5/output/ezxhtml5.xsd'

services:
ezrichtext.normalizer.input:
Ibexa\FieldTypeRichText\RichText\Normalizer\DocumentTypeDefinition:
class: Ibexa\FieldTypeRichText\RichText\Normalizer\DocumentTypeDefinition
arguments:
- 'section'
- 'http://ez.no/namespaces/ezpublish5/xhtml5/edit'
- '%ezrichtext.resources%/dtd/ezxhtml5_edit_html_character_entities.dtd'

ezrichtext.converter.input.dispatcher:
Ibexa\FieldTypeRichText\RichText\ConverterDispatcher:
class: Ibexa\FieldTypeRichText\RichText\ConverterDispatcher
arguments:
-
http://docbook.org/ns/docbook: null
http://ez.no/namespaces/ezpublish5/xhtml5/edit: '@ezrichtext.converter.input.xhtml5'
http://ez.no/namespaces/ezpublish5/xhtml5/edit: '@ibexa.richtext.converter.input.xhtml5'

ezrichtext.renderer:
Ibexa\FieldTypeRichText\RichText\Renderer:
class: Ibexa\FieldTypeRichText\RichText\Renderer
arguments:
- '@ezpublish.api.repository'
- '@ibexa.api.repository'
- '@security.authorization_checker'
- '@ezpublish.config.resolver'
- '@ibexa.config.resolver'
- '@twig'
- '%ezrichtext.tag.namespace%'
- '%ezrichtext.style.namespace%'
Expand All @@ -44,104 +44,104 @@ services:
- '%ezplatform.ezrichtext.custom_tags%'
- '%ezplatform.ezrichtext.custom_styles%'

ezrichtext.converter.link:
Ibexa\FieldTypeRichText\RichText\Converter\Link:
class: Ibexa\FieldTypeRichText\RichText\Converter\Link
arguments: ['@ezpublish.api.service.location', '@ezpublish.api.service.content', '@ezpublish.urlalias_router', '@?logger']
arguments: ['@ibexa.api.service.location', '@ibexa.api.service.content', '@Ibexa\Bundle\Core\Routing\UrlAliasRouter', '@?logger']
tags:
- {name: ibexa.field_type.richtext.converter.output.xhtml5, priority: 0}

ezrichtext.converter.template:
Ibexa\FieldTypeRichText\RichText\Converter\Render\Template:
class: Ibexa\FieldTypeRichText\RichText\Converter\Render\Template
arguments:
- '@ezrichtext.renderer'
- '@ezrichtext.converter.output.xhtml5'
- '@Ibexa\FieldTypeRichText\RichText\Renderer'
- '@ibexa.richtext.converter.output.xhtml5'
- '@?logger'
tags:
- {name: ibexa.field_type.richtext.converter.output.xhtml5, priority: 10}
lazy: true

ezrichtext.converter.embed:
Ibexa\FieldTypeRichText\RichText\Converter\Render\Embed:
class: Ibexa\FieldTypeRichText\RichText\Converter\Render\Embed
arguments:
- '@ezrichtext.renderer'
- '@Ibexa\FieldTypeRichText\RichText\Renderer'
- '@?logger'
tags:
- {name: ibexa.field_type.richtext.converter.output.xhtml5, priority: 10}

# Note: should typically be the last one as it produces embeddable fragment
ezrichtext.converter.output.xhtml5.fragment:
Ibexa\FieldTypeRichText\RichText\Converter\Xslt:
class: Ibexa\FieldTypeRichText\RichText\Converter\Xslt
arguments: ['%ezrichtext.converter.output.xhtml5.fragment.resources%']
tags:
- {name: ibexa.field_type.richtext.converter.output.xhtml5, priority: 100}

# Aggregate converter for XHTML5 output that other converters register to
# through service tags.
ezrichtext.converter.output.xhtml5:
ibexa.richtext.converter.output.xhtml5:
class: Ibexa\FieldTypeRichText\RichText\Converter\Aggregate
lazy: true

ezrichtext.validator.input.ezxhtml5:
Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate:
class: Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate
arguments: [!tagged ibexa.field_type.richtext.validator.input.xhtml5]

ezrichtext.validator.docbook:
ibexa.richtext.validator.docbook:
class: Ibexa\FieldTypeRichText\RichText\Validator\Validator
arguments: ['%ezrichtext.validator.docbook.resources%']
tags:
- { name: ibexa.field_type.richtext.validator.input.xhtml5 }

ezrichtext.validator.output.ezxhtml5:
ibexa.richtext.validator.output.ezxhtml5:
class: Ibexa\FieldTypeRichText\RichText\Validator\Validator
arguments: ['%ezrichtext.validator.output.ezxhtml5.resources%']

ezrichtext.validator.input.dispatcher:
Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher:
class: Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher
arguments:
-
http://docbook.org/ns/docbook: null
http://ez.no/namespaces/ezpublish5/xhtml5/edit: null
http://ez.no/namespaces/ezpublish5/xhtml5: '@ezrichtext.validator.output.ezxhtml5'
http://ez.no/namespaces/ezpublish5/xhtml5: '@ibexa.richtext.validator.output.ezxhtml5'

ezrichtext.validator.internal_link:
Ibexa\FieldTypeRichText\RichText\Validator\InternalLinkValidator:
class: Ibexa\FieldTypeRichText\RichText\Validator\InternalLinkValidator
arguments:
- '@ezpublish.spi.persistence.cache.contentHandler'
- '@ezpublish.spi.persistence.cache.locationHandler'
- '@Ibexa\Core\Persistence\Cache\ContentHandler'
- '@Ibexa\Core\Persistence\Cache\LocationHandler'
tags:
- { name: ibexa.field_type.richtext.validator.input.xhtml5 }

ezrichtext.converter.output.xhtml5.core:
Ibexa\FieldTypeRichText\RichText\Converter\Html5:
class: Ibexa\FieldTypeRichText\RichText\Converter\Html5
arguments:
- '%ezrichtext.converter.output.xhtml5.resources%'
- '@ezpublish.config.resolver'
- '@ibexa.config.resolver'
tags:
- {name: ibexa.field_type.richtext.converter.output.xhtml5, priority: 50}

# Aggregate converter for XHTML5 input that other converters register to
# through 'ibexa.field_type.richtext.converter.input.xhtml5' service tag.
ezrichtext.converter.input.xhtml5:
ibexa.richtext.converter.input.xhtml5:
class: Ibexa\FieldTypeRichText\RichText\Converter\Aggregate
lazy: true

ezrichtext.converter.input.xhtml5.core:
Ibexa\FieldTypeRichText\RichText\Converter\Html5Input:
class: Ibexa\FieldTypeRichText\RichText\Converter\Html5Input
arguments:
- '%ezrichtext.converter.input.xhtml5.resources%'
- '@ezpublish.config.resolver'
- '@ibexa.config.resolver'
tags:
- {name: ibexa.field_type.richtext.converter.input.xhtml5, priority: 50}

# Note: should run before xsl transformation
ezrichtext.converter.input.xhtml5.programlisting:
Ibexa\FieldTypeRichText\RichText\Converter\ProgramListing:
class: Ibexa\FieldTypeRichText\RichText\Converter\ProgramListing
tags:
- {name: ibexa.field_type.richtext.converter.input.xhtml5, priority: 10}

ezrichtext.converter.edit.xhtml5:
Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit:
class: Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit
arguments:
- '%ezrichtext.converter.edit.xhtml5.resources%'
- '@ezpublish.config.resolver'
- '@ibexa.config.resolver'

6 changes: 3 additions & 3 deletions src/bundle/Resources/config/form.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ services:

Ibexa\FieldTypeRichText\Form\Type\RichTextFieldType:
arguments:
$docbookToXhtml5EditConverter: '@ezrichtext.converter.edit.xhtml5'
$fieldTypeService: '@ezpublish.api.service.field_type'
$docbookToXhtml5EditConverter: '@Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit'
$fieldTypeService: '@ibexa.api.service.field_type'

Ibexa\FieldTypeRichText\Form\Type\RichTextType:
arguments:
$docbookToXhtml5EditConverter: '@ezrichtext.converter.edit.xhtml5'
$docbookToXhtml5EditConverter: '@Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit'

Ibexa\FieldTypeRichText\Validator\Constraints\RichTextValidator:
tags:
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ services:

Ibexa\FieldTypeRichText\REST\FieldTypeProcessor\RichTextProcessor:
arguments:
- '@ezrichtext.converter.edit.xhtml5'
- '@Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit'
tags:
- { name: ibexa.rest.field_type.processor, alias: ezrichtext }
24 changes: 12 additions & 12 deletions src/bundle/Resources/config/settings/fieldtype_services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@ services:
autoconfigure: true
public: false

ezrichtext.converter.input.dispatcher:
Ibexa\FieldTypeRichText\RichText\ConverterDispatcher:
class: Ibexa\FieldTypeRichText\RichText\ConverterDispatcher
arguments:
-
http://docbook.org/ns/docbook: null

ezrichtext.validator.input.ezxhtml5:
Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate:
class: Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate
arguments: [!tagged ibexa.field_type.richtext.validator.input.xhtml5]

ezrichtext.validator.docbook:
ibexa.richtext.validator.docbook:
class: Ibexa\FieldTypeRichText\RichText\Validator\Validator
arguments: ['%ezrichtext.validator.docbook.resources%']
tags:
- { name: ibexa.field_type.richtext.validator.input.xhtml5 }

ezrichtext.validator.input.dispatcher:
Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher:
class: Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher
arguments:
-
http://docbook.org/ns/docbook: null

ezrichtext.validator.internal_link:
Ibexa\FieldTypeRichText\RichText\Validator\InternalLinkValidator:
class: Ibexa\FieldTypeRichText\RichText\Validator\InternalLinkValidator
arguments:
- '@ezpublish.spi.persistence.cache.contentHandler'
- '@ezpublish.spi.persistence.cache.locationHandler'
- '@Ibexa\Core\Persistence\Cache\ContentHandler'
- '@Ibexa\Core\Persistence\Cache\LocationHandler'
tags:
- { name: ibexa.field_type.richtext.validator.input.xhtml5 }

ezrichtext.normalizer.input:
Ibexa\FieldTypeRichText\RichText\Normalizer\DocumentTypeDefinition:
class: Ibexa\FieldTypeRichText\RichText\Normalizer\Aggregate

# Symfony 3.4+ service definitions:
Expand All @@ -56,10 +56,10 @@ services:
Ibexa\FieldTypeRichText\RichText\InputHandler:
arguments:
- '@Ibexa\FieldTypeRichText\RichText\DOMDocumentFactory'
- '@ezrichtext.converter.input.dispatcher'
- '@ezrichtext.normalizer.input'
- '@ezrichtext.validator.input.dispatcher'
- '@ezrichtext.validator.input.ezxhtml5'
- '@Ibexa\FieldTypeRichText\RichText\ConverterDispatcher'
- '@Ibexa\FieldTypeRichText\RichText\Normalizer\DocumentTypeDefinition'
- '@Ibexa\FieldTypeRichText\RichText\Validator\ValidatorDispatcher'
- '@Ibexa\FieldTypeRichText\RichText\Validator\ValidatorAggregate'
- '@Ibexa\FieldTypeRichText\RichText\RelationProcessor'

# Default InputHandler
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/settings/fieldtypes.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
Ibexa\FieldTypeRichText\FieldType\RichText\Type:
public: true # @todo should be private
parent: ezpublish.fieldType
parent: Ibexa\Core\FieldType\FieldType
arguments:
- '@Ibexa\FieldTypeRichText\RichText\InputHandler'
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ services:

Ibexa\FieldTypeRichText\FieldType\RichText\RichTextStorage\Gateway\DoctrineStorage:
arguments:
- '@ezpublish.fieldType.ezurl.storage_gateway'
- '@ezpublish.api.storage_engine.legacy.connection'
- '@Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage'
- '@ibexa.api.storage_engine.legacy.connection'
4 changes: 2 additions & 2 deletions src/bundle/Resources/config/templating.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:

Ibexa\Bundle\FieldTypeRichText\Templating\Twig\Extension\RichTextConverterExtension:
arguments:
$richTextOutputConverter: '@ezrichtext.converter.output.xhtml5'
$richTextEditConverter: '@ezrichtext.converter.edit.xhtml5'
$richTextOutputConverter: '@ibexa.richtext.converter.output.xhtml5'
$richTextEditConverter: '@Ibexa\FieldTypeRichText\RichText\Converter\Html5Edit'

Ibexa\Bundle\FieldTypeRichText\Templating\Twig\Extension\YoutubeIdExtractorExtension: ~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{{
render(
controller(
"ez_content:embedAction",
"ibexa_content:embedAction",
{
"contentId": embedParams.id,
"viewType": embedParams.viewType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{{
render(
controller(
"ez_content:viewAction",
"ibexa_content:viewAction",
{
"contentId": embedParams.id,
"viewType": embedParams.viewType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{
render(
controller(
"ez_content:viewAction",
"ibexa_content:viewAction",
{
"locationId": embedParams.id,
"viewType": embedParams.viewType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{{
render(
controller(
"ez_content:viewAction",
"ibexa_content:viewAction",
{
"locationId": embedParams.id,
"viewType": embedParams.viewType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testCollectProviders()
{
$configurationResolver = new Definition();
$this->setDefinition(
'ezrichtext.converter.output.xhtml5',
'ibexa.richtext.converter.output.xhtml5',
$configurationResolver
);

Expand All @@ -56,7 +56,7 @@ public function testCollectProviders()
$this->compile();

$this->assertContainerBuilderHasServiceDefinitionWithArgument(
'ezrichtext.converter.output.xhtml5',
'ibexa.richtext.converter.output.xhtml5',
0,
[
new Reference('ezrichtext.converter.test1'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected function loadCoreSettings(ContainerBuilder $containerBuilder)
->addMethodCall('connect', [(getenv('CACHE_HOST') ?: '127.0.0.1'), 6379, 2.5]);

$containerBuilder
->register('ezpublish.cache_pool.driver', RedisAdapter::class)
->register('ibexa.cache_pool.driver', RedisAdapter::class)
->setArguments([new Reference('ezpublish.cache_pool.driver.redis'), '', 120]);
}

Expand Down

0 comments on commit 55c2d02

Please sign in to comment.