function simple_styleguide_update_8002 in Simple Style Guide 8
Adding description field to styleguide patterns.
File
- ./
simple_styleguide.install, line 27 - Contains simple_styleguide.install.
Code
function simple_styleguide_update_8002() {
$field_storage_definition = BaseFieldDefinition::create('text_long')
->setLabel(t('Description'))
->setDescription(t('Description of entity.'))
->setDefaultValue(0)
->setRevisionable(FALSE);
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('description', 'styleguide_pattern', 'styleguide_pattern', $field_storage_definition);
}