You are here

commerce_demo.module in Commerce Demo 8.2

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

Provides a demo store for Commerce.

File

commerce_demo.module
View source
<?php

/**
 * @file
 * Provides a demo store for Commerce.
 */

/**
 * Implements hook_modules_installed().
 */
function commerce_demo_modules_installed($modules) {
  if (in_array('commerce_demo', $modules, TRUE) && !\Drupal::isConfigSyncing()) {
    $index_storage = \Drupal::entityTypeManager()
      ->getStorage('search_api_index');

    /** @var \Drupal\search_api\IndexInterface $index */
    $index = $index_storage
      ->load('products');
    $index
      ->indexItems();
  }
}

Functions