You are here

function party_activity_entity_info in Party 7

Same name and namespace in other branches
  1. 8.2 modules/party_activity/party_activity.module \party_activity_entity_info()

Implements hook_entity_info().

File

modules/party_activity/party_activity.module, line 9
Functions and important hooks for the party_activity module

Code

function party_activity_entity_info() {
  $info['party_activity'] = array(
    'label' => t('Activity'),
    'plural label' => t('Activities'),
    'entity class' => 'PartyActivity',
    'controller class' => 'PartyActivityController',
    'base table' => 'party_activity',
    'fieldable' => TRUE,
    'entity keys' => array(
      'id' => 'id',
      'label' => 'title',
      'bundle' => 'type',
    ),
    'bundles' => array(),
    'bundle keys' => array(
      'bundle' => 'type',
    ),
    'uri callback' => 'entity_class_uri',
    'creation callback' => 'party_activity_create',
    'access callback' => 'party_activity_access',
    'module' => 'party_activity',
    'admin ui' => array(
      'path' => 'admin/community/activities',
      'file' => 'party_activity.admin.inc',
      'controller class' => 'PartyActivityUIController',
      'menu wildcard' => '%party_activity',
    ),
  );
  $info['party_activity_type'] = array(
    'label' => 'Activity Type',
    'entity class' => 'PartyActivityType',
    'controller class' => 'PartyActivityTypeController',
    'base table' => 'party_activity_type',
    'fieldable' => FALSE,
    'bundle of' => 'party_activity',
    'exportable' => TRUE,
    'entity keys' => array(
      'id' => 'id',
      'name' => 'type',
      'label' => 'label',
    ),
    'access callback' => 'party_activity_type_access',
    'module' => 'party_activity',
    'admin ui' => array(
      'path' => 'admin/structure/activity_types',
      'file' => 'party_activity_type.admin.inc',
      'controller class' => 'PartyActivityTypeUIController',
    ),
  );
  return $info;
}