You are here

function restful_token_auth_entity_info in RESTful 7

Same name and namespace in other branches
  1. 7.2 modules/restful_token_auth/restful_token_auth.module \restful_token_auth_entity_info()

Implements hook_entity_info().

File

modules/restful_token_auth/restful_token_auth.module, line 78
RESTful token authentication.

Code

function restful_token_auth_entity_info() {
  $items['restful_token_auth'] = array(
    'label' => t('Authentication token'),
    'entity class' => 'RestfulTokenAuth',
    'controller class' => 'RestfulTokenAuthController',
    'base table' => 'restful_token_auth',
    'fieldable' => TRUE,
    'entity keys' => array(
      'id' => 'id',
      'label' => 'name',
      'bundle' => 'type',
    ),
    'bundles' => array(
      'access_token' => array(
        'label' => t('Access token'),
      ),
      'refresh_token' => array(
        'label' => t('Refresh token'),
      ),
    ),
    'bundle keys' => array(
      'bundle' => 'type',
    ),
    'module' => 'restful_token_auth',
    'entity cache' => module_exists('entitycache'),
  );
  return $items;
}