You are here

default_content.module in Default Content for D8 2.0.x

Same filename and directory in other branches
  1. 8 default_content.module

Installs default content on the behalf of modules at time of install.

File

default_content.module
View source
<?php

/**
 * @file
 * Installs default content on the behalf of modules at time of install.
 */

/**
 * Implements hook_modules_installed().
 */
function default_content_modules_installed($modules) {

  // @todo Move this to an event once we have HookEvent.
  foreach ($modules as $module) {
    if (!\Drupal::isConfigSyncing()) {
      \Drupal::service('default_content.importer')
        ->importContent($module);
    }
  }
}

Functions