You are here

function opigno_notification_update_8001 in Opigno notifications 8

Add "properties" field to "opigno_notification" entity.

File

./opigno_notification.install, line 14
Opigno notification app install/update functionality.

Code

function opigno_notification_update_8001() {
  $definition = BaseFieldDefinition::create('string')
    ->setLabel(t('Url'))
    ->setDescription(t('The url string for notification entity.'))
    ->setSettings([
    'max_length' => 50,
  ])
    ->setInitialValue('/notifications')
    ->setDefaultValue('/notifications');
  \Drupal::entityDefinitionUpdateManager()
    ->installFieldStorageDefinition('url', 'opigno_notification', 'opigno_notification', $definition);
}