You are here

function efq_views_test_entity_info in EntityFieldQuery Views Backend 7

Implements hook_entity_info().

File

tests/efq_views_test.module, line 11
Provides info about the efq_views test entity.

Code

function efq_views_test_entity_info() {
  $info = array(
    'efq_views_test' => array(
      'label' => t('EFQ Views test'),
      'base table' => 'efq_views_test',
      'entity class' => 'EFQViewsTestEntityClass',
      'controller class' => 'EntityAPIController',
      'uri callback' => 'entity_class_uri',
      'load hook' => 'example_task_load',
      'fieldable' => TRUE,
      'entity keys' => array(
        'id' => 'eid',
        'bundle' => 'ebundle',
        'label' => 'elabel',
      ),
      'bundle keys' => array(
        'bundle' => 'bundle',
      ),
      'bundles' => array(),
    ),
  );
  $info['efq_views_test']['bundles']['bundle1']['label'] = t('Bundle 1');
  $info['efq_views_test']['bundles']['bundle2']['label'] = t('Bundle 2');
  return $info;
}