You are here

function wsconfig_entity_info in Web Service Data 7

Implements hook_entity_info().

File

modules/wsconfig/wsconfig.module, line 89
Main module for wsconfig

Code

function wsconfig_entity_info() {
  $entities = array(
    'wsconfig' => array(
      'label' => t('Web Service Configuration'),
      'entity class' => 'WsConfig',
      'controller class' => 'WsConfigController',
      'base table' => 'wsconfig',
      'fieldable' => FALSE,
      'exportable' => TRUE,
      'translation' => array(
        'locale' => TRUE,
      ),
      'entity keys' => array(
        'id' => 'wsconfig_id',
        'name' => 'name',
        'bundle' => 'type',
      ),
      'bundle keys' => array(
        'bundle' => 'type',
      ),
      'bundles' => array(),
      'load hook' => 'wsconfig_load',
      'view modes' => array(
        'full' => array(
          'label' => t('Default'),
          'custom settings' => FALSE,
        ),
      ),
      'label callback' => 'wsconfig_class_label',
      'uri callback' => 'wsconfig_uri',
      'module' => 'wsconfig',
      'access callback' => 'wsconfig_access',
      // Enable Entity API admin UI
      'admin ui' => array(
        'path' => 'admin/structure/wsconfig',
        'file' => 'wsconfig.admin.inc',
        'controller class' => 'WsConfigUIController',
        'menu wildcard' => '%wsconfig',
      ),
    ),
  );
  $entities['wsconfig_type'] = array(
    'label' => t('Web Service Configuration Type'),
    'entity class' => 'WsConfigType',
    'controller class' => 'WsConfigTypeController',
    'base table' => 'wsconfig_type',
    'fieldable' => FALSE,
    'bundle of' => 'wsconfig',
    'exportable' => TRUE,
    'entity keys' => array(
      'id' => 'id',
      'name' => 'type',
      'label' => 'label',
    ),
    'module' => 'wsconfig',
    // Enable the entity API's admin UI
    'admin ui' => array(
      'path' => 'admin/structure/wsconfig_types',
      'file' => 'wsconfig_type.admin.inc',
      'controller class' => 'WsConfigTypeUIController',
    ),
    'access callback' => 'wsconfig_type_access',
  );
  return $entities;
}