social_auth_linkedin.install in Social Auth LinkedIn 8.2
Same filename and directory in other branches
Install, update, and uninstall functions for the Social Auth LinkedIn module.
File
social_auth_linkedin.installView source
<?php
/**
* @file
* Install, update, and uninstall functions for the Social Auth LinkedIn module.
*/
use Drupal\social_auth\Controller\SocialAuthController;
/**
* Implements hook_install().
*/
function social_auth_linkedin_install() {
SocialAuthController::setLoginButtonSettings('social_auth_linkedin', 'social_auth_linkedin.redirect_to_linkedin', 'img/linkedin_logo.svg');
}
/**
* Implements hook_uninstall().
*/
function social_auth_linkedin_uninstall() {
SocialAuthController::deleteLoginButtonSettings('social_auth_linkedin');
}
/**
* Implements hook_update_N().
*
* The key api_calls was changed to endpoints. This update copies the values
* in 'api_calls' to 'endpoints'.
*/
function social_auth_linkedin_update_8201(&$sandbox) {
$config = \Drupal::configFactory()
->getEditable('social_auth_linkedin.settings');
$endpoints = $config
->get('api_calls');
$config
->set('endpoints', $endpoints)
->save();
}
Functions
Name | Description |
---|---|
social_auth_linkedin_install | Implements hook_install(). |
social_auth_linkedin_uninstall | Implements hook_uninstall(). |
social_auth_linkedin_update_8201 | Implements hook_update_N(). |