social_auth_linkedin.install in Social Auth LinkedIn 8
Same filename and directory in other branches
Install and uninstall functions for the LinkedIn Login module.
File
social_auth_linkedin.installView source
<?php
/**
* @file
* Install and uninstall functions for the LinkedIn Login module.
*/
use Drupal\social_api\Utility\SocialApiImplementerInstaller;
use Drupal\social_auth\Controller\SocialAuthController;
/**
* Implements hook_requirements().
*/
function social_auth_linkedin_requirements($phase) {
$requirements = [];
// Social API should be installed at this point in order to check library.
\Drupal::service('module_installer')
->install([
'social_api',
]);
if ($phase == 'install') {
$requirements = SocialApiImplementerInstaller::checkLibrary('social_auth_linkedin', 'Social Auth Linkedin', 'linkedinapi/linkedin', '1.1.0.0', '2.0.0.0');
}
return $requirements;
}
/**
* 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');
}
Functions
Name | Description |
---|---|
social_auth_linkedin_install | Implements hook_install(). |
social_auth_linkedin_requirements | Implements hook_requirements(). |
social_auth_linkedin_uninstall | Implements hook_uninstall(). |