Skip to content

Data Structure Basics

Terminology

Throughout blökkli you will find terms like block or entity. It's important to understand what each of them mean.

Both a page and a block are entities. Every entity has the following attributes:

entity type

This is the term used to define a specific type of entity. This could be block, content or term.

entity bundle

This defines the specific bundle (or "sub type") of an entity type. Using our examples from before, the three entity types could have these bundles:

block

  • title
  • link
  • rich_text

content

  • editorial
  • blog_post

term

  • category
  • person
  • location

entity UUID

Every entity needs to have a UUID. It doesn't have to be an actual UUID - it can also be 1 or page_213. The UUID cannot be empty.

Ideally the UUID is unique for all entities. But the only requirement is that blocks have a unique UUID.

Relationships

Every block should belong to exactly one parent entity. In the most basic example a block of bundle "title" belongs to a content entity of bundle "blog_post". This is what it might look like in the database:

entity_typeentity_bundleuuidparent_entity_typeparent_entity_uuid
blocktitle1content123
blockrich_text2content123
blocktitle3content123
blocktitle4content5192

This guarantees that editing a block on one page does not affect the block on another page.