Problem/Motivation

Create a Services definition for rendering out block plugins (or any plugin for that matter). Also allow the plugin configuration to be passed in the query string.

Proposed resolution

Create a new endpoint either in Services or in Plugin.

This would replace most of the functionality of Block Render.

Remaining tasks

  1. Get sign-off from a maintainer
  2. Write Patch

User interface changes

Adds a new Services definition for rendering plugins.

API changes

None.

Data model changes

None.

Comments

davidwbarratt created an issue. See original summary.

kylebrowning’s picture

Sounds great.

davidwbarratt’s picture

Issue summary: View changes
eclipsegc’s picture

Services already has an endpoint for rendering blocks, however it renders individual blocks by config entity id. I'm a little more worried about various things Drupal core does when trying to render components of a page in isolation. We can also render nodes and basically any entity that has a view builder (except views, needs special handling).

Also, contextual blocks will be an interesting use case since we'll need to figure out how to inject contexts into them. In short, rendering renderable things (not all plugins are something that's renderable) is a great idea, and Services has a good start on that problem space. Check out the EntityView plugin that's in services already.

Eclipse

anybody’s picture

Version: 8.x-4.x-dev » 5.x-dev