social_auth_google.install in Social Auth Google 3.x
Same filename and directory in other branches
Install, update, and uninstall functions for the Social Auth Google module.
File
social_auth_google.installView source
<?php
/**
* @file
* Install, update, and uninstall functions for the Social Auth Google module.
*/
use Drupal\social_auth\Controller\SocialAuthController;
/**
* Implements hook_install().
*/
function social_auth_google_install() {
SocialAuthController::setLoginButtonSettings('social_auth_google', 'social_auth_google.redirect_to_google', 'img/google_logo.svg');
}
/**
* Implements hook_uninstall().
*/
function social_auth_google_uninstall() {
SocialAuthController::deleteLoginButtonSettings('social_auth_google');
}
/**
* 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_google_update_8201(&$sandbox) {
$config = \Drupal::configFactory()
->getEditable('social_auth_google.settings');
$endpoints = $config
->get('api_calls');
$config
->set('endpoints', $endpoints)
->save();
}
Functions
Name | Description |
---|---|
social_auth_google_install | Implements hook_install(). |
social_auth_google_uninstall | Implements hook_uninstall(). |
social_auth_google_update_8201 | Implements hook_update_N(). |