Problem/Motivation

A minority of paragraph types do not render their fields — they compute. Real examples from the sites: one sums service prices, one collects anchors from its sibling paragraphs, one pulls in a block that belongs to another module. These cannot be structures, and pretending otherwise puts a branch back into the engine.

Proposed resolution

  • A plugin type for paragraph handlers, discovered by paragraph type, taking precedence over the generated structure when present.
  • The plugin gets the paragraph, its siblings and the host entity, since the anchor-collecting case needs all three.
  • Ship none of the site-specific ones in the module: they belong to the sites, and this issue delivers the extension point plus one example in a test module.
  • Document it as one of the extension points in the customization guide.

Remaining tasks

Everything.

Issue fork myrest-3622243

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed 40aa16e1 on 1.0.x
    Issue #3622243: Add a plugin type for paragraph types that compute...
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)