1 entity_caching_test.module | entity_caching_test_entity_info() |
Implements hook_entity_info().
File
- core/
modules/ entity/ tests/ entity_caching_test/ entity_caching_test.module, line 10 - Test module for the entity API providing an entity type for testing.
Code
function entity_caching_test_entity_info() {
$return = array(
'test_cacheable' => array(
'label' => t('Test cacheable entity'),
'entity class' => 'TestCacheable',
'controller class' => 'EntityDatabaseStorageController',
'base table' => 'test_cacheable',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'id',
),
),
'test_disable_cache' => array(
'label' => t('Test disabled cache entity'),
'entity class' => 'TestCacheable',
'controller class' => 'EntityDatabaseStorageController',
'base table' => 'test_disable_cache',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'id',
),
),
'test_multibundle' => array(
'label' => t('Test multiple bundle entity'),
'entity class' => 'TestMultiBundle',
'controller class' => 'EntityDatabaseStorageController',
'base table' => 'test_multibundle',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'id',
'bundle' => 'type',
),
'bundles' => array(
'docache' => array(
'label' => 'Do Cache',
),
'nocache' => array(
'label' => 'No Cache',
),
),
),
);
return $return;
}