social.install in Open Social 8.8
Install, update and uninstall functions for the social installation profile.
File
social.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the social installation profile.
*/
use Drupal\user\Entity\User;
/**
* Implements hook_install().
*
* Perform actions to set up the site for this profile.
*
* @see system_install()
*/
function social_install() {
\Drupal::configFactory()
->getEditable('system.site')
->set('page.front', '/stream')
->save(TRUE);
// Assign user 1 the "administrator" role.
$user = User::load(1);
$user->roles[] = 'administrator';
$user
->save();
}
Functions
Name![]() |
Description |
---|---|
social_install | Implements hook_install(). |