You are here

function restful_test_entity_info in RESTful 7.2

Same name and namespace in other branches
  1. 7 tests/modules/restful_test/restful_test.module \restful_test_entity_info()

Implements hook_entity_info().

File

tests/modules/restful_test/restful_test.module, line 415
Helper module for testing the RESTful module.

Code

function restful_test_entity_info() {
  return array(
    'restful_test_translatable_entity' => array(
      'label' => t('Translatable Test Entity'),
      'plural label' => t('Translatable Test Entities'),
      'description' => t('An entity type used by the RESTful tests.'),
      'entity class' => 'Entity',
      'controller class' => 'EntityAPIController',
      'base table' => 'restful_test_translatable_entity',
      'fieldable' => TRUE,
      'entity keys' => array(
        'id' => 'pid',
        'bundle' => 'name',
        'label' => 'label',
        'uuid' => 'uuid',
      ),
      // Make use the class' label() and uri() implementation by default.
      'label callback' => 'entity_class_label',
      'uri callback' => 'entity_class_uri',
      'bundles' => array(
        'restful_test_translatable_entity' => array(
          'label' => 'Translatable Test Entity',
        ),
      ),
      'bundle keys' => array(
        'bundle' => 'name',
      ),
      'module' => 'restful_test',
      'translation' => array(
        'locale' => TRUE,
      ),
      'uuid' => TRUE,
    ),
  );
}