Skip to content

Drupal Content Entity schema generator for Druxt with support for View and Form displays.

Schema (druxt-schema)

View source on GitHub

Schema : object

The Druxt Schema object.

Kind: global typedef
Properties

NameTypeDescription
configSchemaConfigurationThe schema configuration object.
dataobjectThe raw JSON:API resources data.
displayIdstringThe Drupal Display ID.
druxtSchemaDruxtSchemaInstance of the Druxt Schema.
fieldsobjectThe processed Field schema data.
idstringThe schema ID.
isValidbooleanValid if the Schema is a match for the configuration filters.
resourceTypestringThe JSON:API resource type.

Example

{
  config: {
    bundle: 'page',
    entityType: 'node',
    filter: [],
    mode: 'default',
    schemaType: 'view',
  },
  data: {
    'entity_view_display--entity_view_display': [
      // Entity View Display JSON:API Resource data.
    ],
    'field_config--field_config': [
      // Field Config JSON:API Resource data.
    ],
  },
  displayId: 'node.page.default',
  druxtSchema: DruxtSchema {},
  fields: {
    body: {
      description: '',
      id: 'body',
      label: {
        position: 'hidden',
        text: 'Body',
      },
      required: false,
      settings: {
        config: {
          display_summary: true,
        },
        display: [],
      },
      thirdPartySettings: [],
      type: 'text_default',
      weight: 100,
    },
    ...
  },
  id: 'node--page--default--view',
  isValid: true,
  resourceType: 'node--page',
  schema: Schema { }
}

SchemaConfiguration : object

Druxt Schema configuration object.

Kind: global typedef
See: SchemaConfiguration