Skip to content

fedms_content

Owns the editorial content entities — fedms_event and fedms_session — and the default paragraph types they use.

GitLab

fedms/components/content

What it ships

Content entity types

Entity type Purpose
fedms_event The editorial body of an event.
fedms_session The editorial body of a session.

Both are revisionable, translatable, owner-aware, and bundle-driven. Bundles are the fedms_event_type and fedms_session_type config entities.

Out of the box, one bundle of each ships: in. Customers create their own bundles to model their event/session types.

Paragraph types

Four built-in paragraph types for the description field:

Paragraph type Field
text field_text (formatted text)
media field_media (media reference)
view field_view (views reference)
webform field_webform (webform reference)

Pathauto patterns

  • pathauto.pattern.event — alias pattern for fedms_event.
  • pathauto.pattern.session — alias pattern for fedms_session.

Entity classes

Event (src/Entity/Event.php)

@ContentEntityType(id = "fedms_event") — revisionable, translatable. Base fields:

  • status (boolean)
  • description (paragraph, revisionable, translatable, unlimited cardinality, accepts media/text/view/webform paragraphs)
  • uid (owner)
  • created, changed

Bundle = fedms_event_type.

Session (src/Entity/Session.php)

@ContentEntityType(id = "fedms_session") — same shape as Event.

Bundle = fedms_session_type.

Forms

  • EventForm / EventTypeForm
  • SessionForm / SessionTypeForm

The forms handle the create / edit flows for events and sessions. Customizations to the field order, widget choices, and labels go through the standard Drupal form-display config (managed at /admin/structure/fedms_event_types/manage/<bundle>/form-display).

Access control

  • EventAccessControlHandler
  • SessionAccessControlHandler

Both delegate to the standard Drupal access checks plus the group content access checks via the group module.

Tokens

fedms_content.tokens.inc defines FedMS-specific tokens. (See the file itself for the current set.)

Module dependencies

1
2
3
- group:group
- paragraphs:paragraphs
- viewsreference:viewsreference

Strict types and modern style

fedms_content uses declare(strict_types=1); in all new files and adopts the modern Drupal 11 entity-API style. New code in this module should follow the same conventions.

When to change this module

  • Adding fields to fedms_event or fedms_session.
  • Adding new paragraph types for the description field.
  • Changing the base fields (rare; consider whether it should be a bundle field instead).
  • Adjusting access logic.

When not to change this module

  • Adding fields to the group entity — those go in fedms_federation.
  • Adding new event/session bundles (event types / session types) — those are tenant-specific config, exported per-tenant.

Next steps