default_content.install 382 Bytes
Newer Older
1 2 3 4 5 6 7
<?php

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

8 9 10 11 12 13 14 15 16 17

/**
 * Implements hook_install().
 * check all existing modules for imported content()
 */
function default_content_install() {
  foreach (\Drupal::moduleHandler()->getModuleList() as $module => $null) {
    \Drupal::service('default_content.manager')->importContent($module);
  }
}