whitelabel-8.x-2.x-dev/whitelabel.install

whitelabel.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the White label module.
 */

use Drupal\Core\Session\AccountInterface;

/**
 * Implements hook_install().
 */
function whitelabel_install() {
  if (\Drupal::moduleHandler()->moduleExists('user')) {
    // Allow all accounts to view white labels.
    user_role_grant_permissions(AccountInterface::ANONYMOUS_ROLE, ['view white label pages']);
    user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, ['view white label pages']);
  }
}

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

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