You are here

function eck_entitycache_schema in Entity Construction Kit (ECK) 7.3

Same name and namespace in other branches
  1. 7.2 modules/eck_entitycache/eck_entitycache.install \eck_entitycache_schema()

Implements hook_schema().

File

modules/eck_entitycache/eck_entitycache.install, line 10
Install functions for the ECK Entity cache module.

Code

function eck_entitycache_schema() {
  $schema = array();
  $cache_schema = drupal_get_schema_unprocessed('system', 'cache');
  foreach (EntityType::loadAll() as $entity_type) {
    $schema["cache_entity_{$entity_type->name}"] = $cache_schema;
    $schema["cache_entity_{$entity_type->name}"]['description'] = "Cache table used to store {$entity_type->name} entity records.";
  }
  return $schema;
}