You are here

function opigno_group_manager_update_8002 in Opigno group manager 8

Add required activities field to Opigno Link entity.

File

./opigno_group_manager.install, line 42
Opigno group manager install/update functionality.

Code

function opigno_group_manager_update_8002() {

  // Create a new field definition.
  $field = BaseFieldDefinition::create('string')
    ->setLabel(t('Required activities'))
    ->setDescription(t('The required activities of previous step'))
    ->setSetting('max_length', 8191);

  // Install the new definition.
  $definition_manager = \Drupal::entityDefinitionUpdateManager();
  $definition_manager
    ->installFieldStorageDefinition('required_activities', 'opigno_group_link', 'opigno_group_link', $field);
}