function panopoly_demo_install in Panopoly Demo 8.2
Implements hook_install().
File
- ./
panopoly_demo.install, line 11 - Install and update hooks for Panopoly Demo.
Code
function panopoly_demo_install() {
$migration_ids = [
'panopoly_demo_node',
'panopoly_demo_menu',
];
/** @var \Drupal\panopoly_core\MigrateHelper $migrate_helper */
$migrate_helper = \Drupal::service('panopoly_core.migrate_helper');
$migrate_helper
->import($migration_ids);
// Point the front page to our landing page demo.
_panopoly_demo_set_front_page('/demo');
// Install database search by default.
/** @var \Drupal\Core\Extension\ModuleInstallerInterface $module_installer */
$module_installer = \Drupal::service('module_installer');
$module_installer
->install([
'panopoly_search_db',
]);
}