You are here

function social_post_update_8201 in Social Post 8.2

Same name and namespace in other branches
  1. 3.x social_post.module \social_post_update_8201()

Implements hook_updat_N().

File

./social_post.module, line 13
Install, update, and uninstall functions for the Social Post LinkedIn.

Code

function social_post_update_8201() {
  $definition_manager = \Drupal::entityDefinitionUpdateManager();

  // Creates a new field definition.
  $link_field = BaseFieldDefinition::create('link')
    ->setLabel(t('Link'))
    ->setDescription(t("Link to the user's profile in the provider."));
  $bundle_of = 'social_post';

  // Installs the new definition.
  $definition_manager
    ->installFieldStorageDefinition('link', $bundle_of, $bundle_of, $link_field);
}