29 lines
		
	
	
		
			564 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			564 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
/**
 | 
						|
 * @file
 | 
						|
 * Install, update and uninstall hooks for the figli starter kit install profile.
 | 
						|
 */
 | 
						|
 | 
						|
use Drupal\user\Entity\User;
 | 
						|
 | 
						|
/**
 | 
						|
 * Implements hook_install().
 | 
						|
 *
 | 
						|
 * Perform actions to set up the site for this profile.
 | 
						|
 *
 | 
						|
 * @see system_install()
 | 
						|
 */
 | 
						|
function figli_starter_kit_install() {
 | 
						|
  // Add code here to make nodes, terms, etc.
 | 
						|
  // Assign user 1 the "administrator" role.
 | 
						|
  $user = User::load(1);
 | 
						|
  $user->roles[] = 'root';
 | 
						|
  $user->save();
 | 
						|
 | 
						|
  // Don't do anything else during config sync.
 | 
						|
  if (\Drupal::isConfigSyncing()) {
 | 
						|
    return;
 | 
						|
  }
 | 
						|
}
 |