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

IBX-3962: Introduced ModifyFieldDefinitionFieldsSubscriber #594

Merged

Conversation

ciastektk
Copy link
Contributor

@ciastektk ciastektk commented Oct 10, 2022

Question Answer
Tickets https://issues.ibexa.co/browse/IBX-3962
Bug fix? no
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? yes
License GPL-2.0

This PR introduces ModifyFieldDefinitionFieldsSubscriber allows to modify fields declared in FieldDefinitionType.
To use Subscriber add Ibexa\AdminUi\Form\Type\Extension\ModifyFieldDefinitionsCollectionTypeExtension service definition in bundle.

Generic example:

    ibexa.field_type_identifier.form.type_extension.modify_field_definitions_for_field_type_identifier_field_type:
        class: 'Ibexa\AdminUi\Form\Type\Extension\ModifyFieldDefinitionsCollectionTypeExtension'
        arguments:
            $fieldTypeIdentifier: 'field_type_identifier'
            $modifiedOptions:
                option_1: value
                option_n: value
        tags:
            - form.type_extension

Allowed options:

  • disable_identifier_field
  • disable_required_field
  • disable_translatable_field
  • disable_remove

Example for ibexa/seo:

    ibexa.seo.form.type_extension.disable_required_option_for_ibexa_seo_field_type:
        class: 'Ibexa\AdminUi\Form\Type\Extension\ModifyFieldDefinitionsCollectionTypeExtension'
        arguments:
            $fieldTypeIdentifier: 'ibexa_seo'
            $modifiedOptions:
                disable_required_field: true
        tags:
            - form.type_extension

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@ciastektk ciastektk requested a review from a team October 10, 2022 11:39
@alongosz alongosz requested a review from a team October 10, 2022 12:26
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ciastektk ciastektk changed the title IBX-3962: Introduced DisableFieldDefinitionFieldsSubscriber IBX-3962: Introduced ModifyFieldDefinitionFieldsSubscriber Oct 11, 2022
Copy link
Contributor

@webhdx webhdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should also try to add DataTransformers and EventListeners back as this was one of the main arguments against this solution.

@ciastektk
Copy link
Contributor Author

I think you should also try to add DataTransformers and EventListeners back as this was one of the main arguments against this solution.

After @ibexa/php-dev discussion we decided to skip adding this to new created field.

@ciastektk ciastektk requested review from ViniTou and a team October 12, 2022 06:55
@ciastektk ciastektk added Ready for QA Doc needed The changes require some documentation and removed Ready for review labels Oct 17, 2022
Copy link
Contributor

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA approved on IbexaDXP commerce 4.2

@mikadamczyk mikadamczyk merged commit 876c3cf into 4.2 Oct 18, 2022
@mikadamczyk mikadamczyk deleted the ibx-3962-introduced-disable-field-definition-fields-subsciber branch October 18, 2022 12:46
@DominikaK DominikaK removed the Doc needed The changes require some documentation label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants