You are here

function invite_entity_info in Invite 7.4

Implements hook_entity_info().

File

./invite.module, line 29

Code

function invite_entity_info() {
  $return = array(
    'invite' => array(
      'label' => t('Invite'),
      'entity class' => 'Invite',
      'controller class' => 'InviteController',
      'base table' => 'invite',
      'fieldable' => TRUE,
      'entity keys' => array(
        'id' => 'iid',
        'bundle' => 'type',
      ),
      'bundle keys' => array(
        'bundle' => 'type',
      ),
      'bundles' => array(),
      'load hook' => 'invite_load',
      'view modes' => array(
        'full' => array(
          'label' => t('Default'),
          'custom settings' => FALSE,
        ),
      ),
      'label callback' => 'entity_class_label',
      'uri callback' => 'entity_class_uri',
      'module' => 'invite',
      'access callback' => 'invite_access',
      'metadata controller class' => 'InviteMetadataController',
    ),
  );
  $return['invite_type'] = array(
    'label' => t('Invite Type'),
    'entity class' => 'InviteType',
    'controller class' => 'InviteTypeController',
    'base table' => 'invite_type',
    'fieldable' => FALSE,
    'bundle of' => 'invite',
    'exportable' => TRUE,
    'entity keys' => array(
      'id' => 'itid',
      'name' => 'type',
      'label' => 'label',
    ),
    'module' => 'invite',
    // Enable the entity API's admin UI.
    'admin ui' => array(
      'path' => 'admin/structure/invite-types',
      'file' => 'includes/invite.admin.inc',
      'controller class' => 'InviteTypeUIController',
    ),
    'access callback' => 'invite_type_access',
  );
  return $return;
}