function layout_builder_schema
Same name and namespace in other branches
- 11.x core/modules/layout_builder/layout_builder.install \layout_builder_schema()
- 10 core/modules/layout_builder/layout_builder.install \layout_builder_schema()
- 9 core/modules/layout_builder/layout_builder.install \layout_builder_schema()
- 8.9.x core/modules/layout_builder/layout_builder.install \layout_builder_schema()
Implements hook_schema().
File
-
core/
modules/ layout_builder/ layout_builder.install, line 21
Code
function layout_builder_schema() : Schema {
$tables[] = new Table(name: 'inline_block_usage', description: 'Track where a block_content entity is used.', columns: [
Column::int(name: 'block_content_id', description: 'The block_content entity ID.', unsigned: TRUE, notNull: TRUE),
Column::varcharAscii(name: 'layout_entity_type', description: 'The entity type of the parent entity.', length: EntityTypeInterface::ID_MAX_LENGTH, notNull: FALSE, default: new StringValue('')),
Column::varcharAscii(name: 'layout_entity_id', description: 'The ID of the parent entity.', length: 128, notNull: FALSE, default: new StringValue('0')),
], primaryKey: new PrimaryKey([
'block_content_id',
]), indexes: [
new Index(name: 'type_id', columns: [
'layout_entity_type',
'layout_entity_id',
]),
]);
return new Schema(type: SchemaDefinitionType::Module, name: 'layout_builder', tables: $tables);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.