simplytest-8.x-4.x-dev/simplytest.install
simplytest.install
<?php
/**
* @file
* Install, update and uninstall functions for the standard installation profile.
*/
use Drupal\user\Entity\User;
use Drupal\shortcut\Entity\Shortcut;
/**
* Implements hook_install().
*
* Perform actions to set up the site for this profile.
*
* @see system_install()
*/
function simplytest_install() {
// Assign user 1 the "administrator" role.
$user = User::load(1);
$user->roles[] = 'administrator';
$user->save();
}