figli_starter_kit.install 534 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * @file
  4. * Install, update and uninstall hooks for the figli starter kit install profile.
  5. */
  6. /**
  7. * Implements hook_install().
  8. *
  9. * Perform actions to set up the site for this profile.
  10. *
  11. * @see system_install()
  12. */
  13. function figli_starter_kit_install() {
  14. // Add code here to make nodes, terms, etc.
  15. // Assign user 1 the "administrator" role.
  16. $user = User::load(1);
  17. $user->roles[] = 'root';
  18. $user->save();
  19. // Don't do anything else during config sync.
  20. if (\Drupal::isConfigSyncing()) {
  21. return;
  22. }
  23. }