localgovdrupal / localgov_events

Events for LocalGov Drupal.
GNU General Public License v2.0
1 stars 0 forks source link

use something more robust than config fields for event fields #139

Open joachim-n opened 3 months ago

joachim-n commented 3 months ago

The event node type expects a lot of config fields to be present for it to run properly.

Creating further node types that work as events is possible, but it requires manually adding the right fields to a new node type and making sure they're configured correctly.

It would be nicer and more robust if these fields were all defined in code, and if there a way of making further node types behave as events and have all the right fields automatically.

I was thinking first of the entity traits system, but that's in Commerce core -- I was mistakenly remembering that it was in its own module. Still, it would be feasible to extract that out of Commerce into a contrib module.

There's bundle classes in core, and I'm sure I'd seen a contrib module that made the bundle classes configurable in the UI -- but I can't find it.

There's https://www.drupal.org/project/typed_entity but that seems fairly heavy for this.

joachim-n commented 3 months ago

https://www.drupal.org/project/bca might be relevant, but it's all code rather than config, so wouldn't allow multiple event node types.