You are here

function social_font_install in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_font/social_font.install \social_font_install()
  2. 8.2 modules/custom/social_font/social_font.install \social_font_install()
  3. 8.3 modules/custom/social_font/social_font.install \social_font_install()
  4. 8.4 modules/custom/social_font/social_font.install \social_font_install()
  5. 8.5 modules/custom/social_font/social_font.install \social_font_install()
  6. 8.6 modules/custom/social_font/social_font.install \social_font_install()
  7. 8.7 modules/custom/social_font/social_font.install \social_font_install()
  8. 8.8 modules/custom/social_font/social_font.install \social_font_install()
  9. 10.3.x modules/custom/social_font/social_font.install \social_font_install()
  10. 10.0.x modules/custom/social_font/social_font.install \social_font_install()
  11. 10.1.x modules/custom/social_font/social_font.install \social_font_install()
  12. 10.2.x modules/custom/social_font/social_font.install \social_font_install()

The social_font install file.

File

modules/custom/social_font/social_font.install, line 14
Contains social_font.install.

Code

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

  // Set some default permissions.
  _social_font_set_permissions();
}