You are here

social_post.module in Social Post 8.2

Same filename and directory in other branches
  1. 3.x social_post.module

Install, update, and uninstall functions for the Social Post LinkedIn.

File

social_post.module
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for the Social Post LinkedIn.
 */
use Drupal\Core\Field\BaseFieldDefinition;

/**
 * Implements hook_updat_N().
 */
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);
}

Functions

Namesort descending Description
social_post_update_8201 Implements hook_updat_N().