social_post.module in Social Post 3.x
Same filename and directory in other branches
Install, update, and uninstall functions for the Social Post LinkedIn.
File
social_post.moduleView 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
Name![]() |
Description |
---|---|
social_post_update_8201 | Implements hook_updat_N(). |