function services_entity_test_entity_info in Services Entity API 7.2
Implements hook_entity_info().
File
- tests/
services_entity_test/ services_entity_test.module, line 11 - services_entity_test.module Provides a test entity type for the services entity tests.
Code
function services_entity_test_entity_info() {
$return = array(
'services_entity_test' => array(
'label' => t('Services Test Entity'),
'plural label' => t('Services Test Entities'),
'description' => t('An entity type used by the Services Entity tests.'),
'entity class' => 'ServicesEntityClass',
'controller class' => 'EntityAPIController',
'base table' => 'services_entity_test',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'eid',
'bundle' => 'type',
),
// Make use the class' label() and uri() implementation by default.
'label callback' => 'entity_class_label',
'uri callback' => 'entity_class_uri',
'access callback' => 'services_entity_test_access',
'bundles' => array(
// Provide two bundles so we can test bundle-related things.
'alpha' => array(
'label' => t('Alpha'),
),
'beta' => array(
'label' => t('Beta'),
),
),
'module' => 'services_entity_test',
),
);
return $return;
}