You are here

mongodb_taxonomy.module in MongoDB 8

File

mongodb_taxonomy/mongodb_taxonomy.module
View source
<?php

/**
 * @file
 * Contains mongodb_taxonomy.module
 */

/**
 *  Implements hook_entity_type_alter().
 */
function mongodb_taxonomy_entity_type_alter(array &$entity_types) {
  if (isset($entity_types['taxonomy_term'])) {
    $entity_types['taxonomy_term']
      ->setStorageClass('Drupal\\mongodb_taxonomy\\MongodbTermStorage');
  }
  if (isset($entity_types['taxonomy_vocabulary'])) {
    $entity_types['taxonomy_vocabulary']
      ->setStorageClass('Drupal\\mongodb_taxonomy\\MongodbVocabularyStorage');
  }
}

Functions