Custom Entity Types

Last updated on
20 September 2022

Patternkit Pattern (patternkit_pattern)

This entity type serves as a mechanism for caching pattern data once it's ready for placement in a block. The schema and template used for the content rendering are recorded and saved as an entity in the database, and the block placement in the Layout Builder configuration stores a reference to the specific revision of the pattern entity being used. This allows the block to load the same schema and template every time for rendering without concern for the pattern's schema or template changing upstream and breaking things unexpectedly.

Each time a block is edited, the contents of the entity are compared against the current values discovered from the pattern library plugins to determine whether an update is available. If these differ, the user is presented with a prompt on the block edit form giving them the option to update the version stored within the database to match the current pattern data.

Patternkit Block (patternkit_block)

This entity type encapsulates the instance of a pattern placed in a layout using Layout Builder. When a pattern is placed, a new Patternkit Block entity is created to store the configuration data to be fed into the pattern for rendering.

Help improve this page

Page status: No known problems

You can: