Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove class parameters #106

Merged
merged 1 commit into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function addFieldTypeSemanticConfig(NodeBuilder $nodeBuilder)
->info('Custom XSL stylesheets to use for XmlText transformation to HTML5. Useful for "custom tags".')
->example(
[
'path' => '%kernel.root_dir%/../src/Acme/TestBundle/Resources/myTag.xsl',
'path' => '%kernel.project_dir%/src/Acme/TestBundle/Resources/myTag.xsl',
'priority' => 10,
]
)
Expand Down
4 changes: 2 additions & 2 deletions bundle/Resources/config/default_settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ parameters:
# Built-in stylesheets are treated as custom for the sake of extensibility.
ezsettings.default.fieldtypes.ezxml.custom_xsl:
-
path: "%kernel.root_dir%/../vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5_core.xsl"
path: "%kernel.project_dir%/vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5_core.xsl"
priority: 0
-
path: "%kernel.root_dir%/../vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5_custom.xsl"
path: "%kernel.project_dir%/vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5_custom.xsl"
priority: 0
20 changes: 7 additions & 13 deletions bundle/Resources/config/fieldtype_services.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
parameters:
ezpublish.fieldType.ezxmltext.converter.html5.class: eZ\Publish\Core\FieldType\XmlText\Converter\Html5
ezpublish.fieldType.ezxmltext.converter.html5.resources: "%kernel.root_dir%/../vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5.xsl"
ezpublish.fieldType.ezxmltext.converter.embedToHtml5.class: eZ\Publish\Core\FieldType\XmlText\Converter\EmbedToHtml5
ezpublish.fieldType.ezxmltext.converter.html5.resources: "%kernel.project_dir%/vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5.xsl"
ezpublish.fieldType.ezxmlText.converter.embedToHtml5.excludedAttributes: [view, node_id, object_id]
ezpublish.fieldType.ezxmltext.converter.ezLinkToHtml5.class: eZ\Publish\Core\FieldType\XmlText\Converter\EzLinkToHtml5
ezpublish.fieldType.ezxmltext.converter.expanding.class: eZ\Publish\Core\FieldType\XmlText\Converter\Expanding
ezpublish.fieldType.ezxmltext.converter.embedLinking.class: eZ\Publish\Core\FieldType\XmlText\Converter\EmbedLinking
ezpublish.fieldType.ezxmltext.validator.internal_link.class: eZ\Publish\Core\FieldType\XmlText\InternalLinkValidator

services:
ezpublish.fieldType.ezxmltext.converter.html5:
class: "%ezpublish.fieldType.ezxmltext.converter.html5.class%"
class: eZ\Publish\Core\FieldType\XmlText\Converter\Html5
arguments:
- "%ezpublish.fieldType.ezxmltext.converter.html5.resources%"
- "@ezpublish.config.resolver"

ezpublish.fieldType.ezxmltext.converter.expanding:
class: "%ezpublish.fieldType.ezxmltext.converter.expanding.class%"
class: eZ\Publish\Core\FieldType\XmlText\Converter\Expanding
tags:
- { name: ezpublish.ezxml.converter, priority: 32 }

ezpublish.fieldType.ezxmltext.converter.embedLinking:
class: "%ezpublish.fieldType.ezxmltext.converter.embedLinking.class%"
class: eZ\Publish\Core\FieldType\XmlText\Converter\EmbedLinking
tags:
- { name: ezpublish.ezxml.converter, priority: 24 }

ezpublish.fieldType.ezxmltext.converter.ezLinkToHtml5:
class: "%ezpublish.fieldType.ezxmltext.converter.ezLinkToHtml5.class%"
class: eZ\Publish\Core\FieldType\XmlText\Converter\EzLinkToHtml5
arguments:
- "@ezpublish.api.service.location"
- "@ezpublish.api.service.content"
Expand All @@ -36,7 +30,7 @@ services:
- { name: ezpublish.ezxml.converter, priority: 16 }

ezpublish.fieldType.ezxmltext.converter.embedToHtml5:
class: "%ezpublish.fieldType.ezxmltext.converter.embedToHtml5.class%"
class: eZ\Publish\Core\FieldType\XmlText\Converter\EmbedToHtml5
arguments:
- "@fragment.handler"
- "@ezpublish.api.repository"
Expand All @@ -46,7 +40,7 @@ services:
- { name: ezpublish.ezxml.converter, priority: 8 }

ezpublish.fieldType.ezxmltext.validator.internal_link:
class: '%ezpublish.fieldType.ezxmltext.validator.internal_link.class%'
class: eZ\Publish\Core\FieldType\XmlText\InternalLinkValidator
arguments:
- '@ezpublish.spi.persistence.cache.contentHandler'
- '@ezpublish.spi.persistence.cache.locationHandler'
Expand Down
5 changes: 1 addition & 4 deletions bundle/Resources/config/services.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
parameters:
ezpublish_rest.field_type_processor.ezxmltext.class: eZ\Publish\Core\REST\Common\FieldTypeProcessor\XmlTextProcessor

services:
ezpublish_rest.field_type_processor.ezxmltext:
class: "%ezpublish_rest.field_type_processor.ezxmltext.class%"
class: eZ\Publish\Core\REST\Common\FieldTypeProcessor\XmlTextProcessor
tags:
- { name: ezpublish_rest.field_type_processor, alias: ezxmltext }

Expand Down
5 changes: 1 addition & 4 deletions bundle/Resources/config/templating.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
parameters:
ezpublish.twig.extension.xml_text.class: EzSystems\EzPlatformXmlTextFieldTypeBundle\Templating\Twig\Extension\XmlTextExtension

services:
ezpublish.twig.extension.xml_text:
class: "%ezpublish.twig.extension.xml_text.class%"
class: EzSystems\EzPlatformXmlTextFieldTypeBundle\Templating\Twig\Extension\XmlTextExtension
arguments: ["@ezpublish.fieldType.ezxmltext.converter.html5"]
tags:
- { name: twig.extension }
5 changes: 1 addition & 4 deletions lib/settings/fieldtype_external_storages.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
parameters:
ezpublish.fieldType.ezxmltext.externalStorage.class: eZ\Publish\Core\FieldType\XmlText\XmlTextStorage

services:
ezpublish.fieldType.ezxmltext.externalStorage:
class: "%ezpublish.fieldType.ezxmltext.externalStorage.class%"
class: eZ\Publish\Core\FieldType\XmlText\XmlTextStorage
public: true
arguments:
- "@ezpublish.fieldType.ezxmltext.storage_gateway"
Expand Down
11 changes: 3 additions & 8 deletions lib/settings/fieldtypes.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
parameters:
ezpublish.fieldType.ezxmltext.class: eZ\Publish\Core\FieldType\XmlText\Type
ezpublish.fieldType.ezxmltext.formMapper.class: eZ\Publish\Core\FieldType\XmlText\FormMapper
ezpublish.fieldType.ezxmltext.formType.class: eZ\Publish\Core\FieldType\XmlText\FormType

services:
ezpublish.fieldType.ezxmltext:
class: "%ezpublish.fieldType.ezxmltext.class%"
class: eZ\Publish\Core\FieldType\XmlText\Type
parent: ezpublish.fieldType
public: true
arguments:
Expand All @@ -14,12 +9,12 @@ services:
- {name: ezpublish.fieldType, alias: ezxmltext}

ezpublish.fieldType.ezxmltext.formMapper:
class: "%ezpublish.fieldType.ezxmltext.formMapper.class%"
class: eZ\Publish\Core\FieldType\XmlText\FormMapper
tags:
- { name: ez.fieldFormMapper.value, fieldType: ezxmltext }

ezpublish.fieldType.ezxmltext.formType:
class: "%ezpublish.fieldType.ezxmltext.formType.class%"
class: eZ\Publish\Core\FieldType\XmlText\FormType
arguments:
- "@ezpublish.api.service.field_type"
tags:
Expand Down
5 changes: 1 addition & 4 deletions lib/settings/indexable_fieldtypes.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
parameters:
ezpublish.fieldType.indexable.ezxmltext.class: eZ\Publish\Core\FieldType\XmlText\SearchField

services:
ezpublish.fieldType.indexable.ezxmltext:
class: "%ezpublish.fieldType.indexable.ezxmltext.class%"
class: eZ\Publish\Core\FieldType\XmlText\SearchField
tags:
- {name: ezpublish.fieldType.indexable, alias: ezxmltext}
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
parameters:
ezpublish.fieldType.ezxmltext.storage_gateway.class: eZ\Publish\Core\FieldType\XmlText\XmlTextStorage\Gateway\LegacyStorage

services:
ezpublish.fieldType.ezxmltext.storage_gateway:
class: "%ezpublish.fieldType.ezxmltext.storage_gateway.class%"
class: eZ\Publish\Core\FieldType\XmlText\XmlTextStorage\Gateway\LegacyStorage
arguments:
- "@ezpublish.api.storage_engine.legacy.dbhandler"
- "@ezpublish.fieldType.ezurl.storage_gateway"
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
parameters:
ezpublish.fieldType.ezxmltext.converter.class: eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\XmlTextConverter

services:
# Note: converter services tagged with 'ezpublish.storageEngine.legacy.converter' are
# registered to this one using compilation pass and factory
ezpublish.fieldType.ezxmltext.converter:
class: "%ezpublish.fieldType.ezxmltext.converter.class%"
class: eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\XmlTextConverter
tags:
- {name: ezpublish.storageEngine.legacy.converter, alias: ezxmltext, lazy: true, callback: '::create'}
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public function xmlTextSettingsProvider()
[
'fieldtypes.ezxml.custom_xsl' => [
// Default settings will be added
['path' => '%kernel.root_dir%/../vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5_core.xsl', 'priority' => 0],
['path' => '%kernel.root_dir%/../vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5_custom.xsl', 'priority' => 0],
['path' => '%kernel.project_dir%/vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5_core.xsl', 'priority' => 0],
['path' => '%kernel.project_dir%/vendor/ezsystems/ezplatform-xmltext-fieldtype/lib/FieldType/XmlText/Input/Resources/stylesheets/eZXml2Html5_custom.xsl', 'priority' => 0],
['path' => '/foo/bar.xsl', 'priority' => 123],
['path' => '/foo/custom.xsl', 'priority' => -10],
['path' => '/another/custom.xsl', 'priority' => 27],
Expand Down