Bundles

Last updated on
5 May 2017

In Drupal 8, bundles are a type of container for information that holds the field or setting definitions. They are sometimes called "sub-types". Bundles are optional and in the hierarchy of container types for information they fit below entity types.

  • Entity variants (content and configuration; many entities come in pairs, e.g. blocks)
    • Entity types
      • Bundles, or sub-types (optional)

Examples of those container types are as follows:

  • Entity Variants:
    1. Content
      • Content Entity Types:
        1. Node
          • Node Bundles, aka Content Types:
            1. Article
            2. Basic page
        2. Taxonomy
          • Taxonomy Bundles, aka Vocabularies:
            1. <Vocabulary A>
            2. <Vocabulary B>
            3. <Vocabulary Etc.>
        3. Blocks
          • Custom Block Bundles, aka Custom Block Types:
            1. <Block Type L>
            2. <Block Type M>
            3. <Block Type Etc.>
        4. User (has no child bundles)
        5. <Custom content entity type X>
        6. <Custom content entity type Y>
        7. <Custom content entity type Etc.>
    2. Configuration
      • Configuration Entity Types:
        1. Custom Block types(has no child bundles?)
        2. View(has no child bundles)
        3. Menu (has no child bundles)
        4. Role (has no child bundles)
        5. <Custom config entity type I>
        6. <Custom config entity type II>
        7. <Custom config entity type Etc.>