You are here

public static function EntityReferenceLayoutRevisioned::schema in Entity Reference with Layout 8

Define field schema.

Overrides EntityReferenceRevisionsItem::schema

1 call to EntityReferenceLayoutRevisioned::schema()
entity_reference_layout_update_8102 in ./entity_reference_layout.install
Adds the config column to all entity_reference_layout field tables.

File

src/Plugin/Field/FieldType/EntityReferenceLayoutRevisioned.php, line 56

Class

EntityReferenceLayoutRevisioned
Entity Reference Layout Revisioned field type.

Namespace

Drupal\entity_reference_layout\Plugin\Field\FieldType

Code

public static function schema(FieldStorageDefinitionInterface $field_definition) {
  $schema = parent::schema($field_definition);
  $schema['columns']['region'] = [
    'type' => 'varchar',
    'length' => '60',
    'not null' => FALSE,
  ];
  $schema['columns']['layout'] = [
    'type' => 'varchar',
    'length' => '60',
    'not null' => FALSE,
  ];
  $schema['columns']['section_id'] = [
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => FALSE,
  ];
  $schema['columns']['options'] = [
    'type' => 'blob',
    'size' => 'normal',
    'serialize' => TRUE,
    'not null' => FALSE,
  ];
  $schema['columns']['config'] = [
    'type' => 'blob',
    'size' => 'normal',
    'serialize' => TRUE,
    'not null' => FALSE,
  ];
  return $schema;
}