provide a block condition plugin

Created on 30 October 2024, 4 months ago

It would be nice to provide a block condition plugin so that block visibility can be controlled with ECA.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @nojj
  • 🇩🇪Germany jurgenhaas Gottmadingen

    New features always go into the latest minor dev release.

  • 🇮🇹Italy kopeboy Milan

    I think the feature is already available here: https://www.drupal.org/project/eca_condition ☺️

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Yes, that's exactly what we're looking for. I've looked into it and there are a few things that need to be done:

    • Security advisory policy
    • Drupal 11 support
    • ECA 2.0 support
    • Improve discoverability of the module, or merge it with ECA core

    I've pinged the maintainer @zipme_hkt to see if they want to discuss this with us.

  • 🇻🇳Vietnam zipme_hkt

    I added beta release for ECA Condition with ECA V2

    https://www.drupal.org/project/eca_condition

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thanks @zipme_hkt this looks much better now and I'm glad that it doesn't require the extra config layer any more that was contained in version 1. However, there are a few suggestions on how you could improve that even further:

    • You probably don't need a separate action plugin to set the access result, you could probably use the set access result from eca_access for that.
    • ECA v2 doesn't require EventSubscribers any more, the token data can be set in the ECA event class now.
    • The event config form doesn't provide the field for the condition ID. And you can remove the help field. It won't be displayed in bpmn_io and also, if your token provider method uses attributes like you can find in other ECA event classes, then the tokens will be exposed by ECA automatically.
    • The module file and the HookHandler seem to be overkill in this scenario. You can dispatch the event directly in the ECACondition plugin. As a result, you then don't even need the services file.

    Looking at this, I'd really like to include this into the eca_access sub-module as this is something that is so generic, that this should be part of ECA's main module. Would you mind if we included it there?

  • 🇩🇪Germany jurgenhaas Gottmadingen

    @zipme_hkt ping. How do you feel about merging this into ECA? I think, it's important for everyone.

Production build 0.71.5 2024