<?php

/**
 * @file
 * Contains social_font.install.
 */

use Drupal\social_font\Entity\Font;

/**
 * The social_font install file.
 */
function social_font_install() {

  $font = Font::create([
    'name' => 'Montserrat',
    'user_id' => 1,
    'created' => \Drupal::time()->getRequestTime(),
    'field_fallback' => '1',
  ]);

  $font->save();

  // Grant the default permissions for this feature.
  user_role_grant_permissions(
    'sitemanager',
    [
      'add font entities',
      'delete font entities',
      'edit font entities',
      'access font overview',
      'view published font entities',
      'view unpublished font entities',
    ]
  );
}
