Skip to content

[5.0][Events] Custom fields event classes#41495

Merged
HLeithner merged 10 commits intojoomla:5.0-devfrom
Fedik:event-custon-fields
Sep 2, 2023
Merged

[5.0][Events] Custom fields event classes#41495
HLeithner merged 10 commits intojoomla:5.0-devfrom
Fedik:event-custon-fields

Conversation

@Fedik
Copy link
Member

@Fedik Fedik commented Aug 28, 2023

Summary of Changes

Event classes for Custom fields.

Affected events:

  • onCustomFieldsGetTypes
  • onCustomFieldsPrepareDom
  • onCustomFieldsBeforePrepareField
  • onCustomFieldsPrepareField
  • onCustomFieldsAfterPrepareField

Testing Instructions

Use custom fields

Actual result BEFORE applying this Pull Request

Works

Expected result AFTER applying this Pull Request

Works

Link to documentations

Please select:

@Fedik Fedik marked this pull request as draft August 28, 2023 09:51
@Fedik Fedik added Feature b/c break This item changes the behavior in an incompatible why. HEADS UP labels Aug 28, 2023
@Fedik Fedik removed the b/c break This item changes the behavior in an incompatible why. HEADS UP label Aug 28, 2023
@Fedik Fedik marked this pull request as ready for review August 28, 2023 12:23
@HLeithner
Copy link
Member

Merging this as with code review and based on the other similar PRs, before beta1 to get enough feedback for final release.

Additionally we need a deprecation warning for plugins which extend the FieldsPlugin without the subscriber interface.

Suggestion, create a constructor function which test if $this is instance of SubscriberInterface.

@HLeithner HLeithner merged commit a8404f4 into joomla:5.0-dev Sep 2, 2023
@Fedik Fedik deleted the event-custon-fields branch September 2, 2023 14:52
@Fedik
Copy link
Member Author

Fedik commented Sep 2, 2023

This is unnecessary, whole legacy listeners code should go, not only for FieldsPlugin.

@HLeithner
Copy link
Member

yes but that means we have to call $y = $event->getY() anyway when we don't have references anymore. In this case maybe it make sense to not have (pseudo)references at the caller location at all and always run $x = $event->getX() for every reference/proxyArray we use now?

@Fedik
Copy link
Member Author

Fedik commented Sep 3, 2023

You comented in wrong PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants