function commerce_order_types_entity_info in Commerce Order Types 7
Implements hook_entity_info().
File
- ./
commerce_order_types.module, line 56 - Provides a UI for creating and managing custom order types.
Code
function commerce_order_types_entity_info() {
$info['commerce_order_type'] = array(
'label' => t('Order type'),
'plural label' => t('Order types'),
'description' => t('Types of commerce order.'),
'entity class' => 'CommerceOrderType',
'controller class' => 'EntityAPIControllerExportable',
'base table' => 'commerce_order_types',
'fieldable' => FALSE,
'bundle of' => 'commerce_order',
'exportable' => TRUE,
'entity keys' => array(
'id' => 'id',
'name' => 'type',
'label' => 'name',
),
'access callback' => 'commerce_order_type_access',
'module' => 'commerce_order_types',
// Enable the entity API's admin UI.
'admin ui' => array(
'path' => 'admin/commerce/config/order-types',
'file' => 'commerce_order_types.admin.inc',
'controller class' => 'EntityDefaultUIController',
),
);
return $info;
}