staysis-8.x-1.x-dev/staysis.install

staysis.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the staysis installation profile.
 */

use Drupal\user\Entity\User;

/**
 * Implements hook_install().
 *
 * Perform actions to set up the site for this profile.
 *
 * @see system_install()
 */
function staysis_install() {
  // Assign user 1 the "administrator" role.
  $user = User::load(1);
  $user->roles[] = 'administrator';
  $user->save();
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc