You are here

function commerce_pricelist_entity_info in Commerce Pricelist 7

Implements hook_entity_info().

This is the fundamental description of the entity.

It provides a single entity with a single bundle and without revision support.

File

./commerce_pricelist.module, line 106
Implements the basic functionality required for price lists

Code

function commerce_pricelist_entity_info() {
  $info['commerce_pricelist_list'] = array(
    'label' => t('Commerce Price List list'),
    'entity class' => 'CommercePricelistList',
    'controller class' => 'CommercePricelistListController',
    'base table' => 'commerce_pricelist_list',
    'uri callback' => 'commerce_pricelist_list_uri',
    'access callback' => 'commerce_pricelist_entity_access',
    'metadata controller class' => FALSE,
    'fieldable' => FALSE,
    'uuid' => TRUE,
    'entity keys' => array(
      'id' => 'list_id',
      'uuid' => 'uuid',
      'label' => 'title',
    ),
    'bundle keys' => array(
      'bundle' => 'list_id',
    ),
    'bundles' => array(),
    'static cache' => TRUE,
    'view modes' => array(
      'full' => array(
        'label' => t('full'),
        'custom settings' => FALSE,
      ),
    ),
  );
  $info['commerce_pricelist_item'] = array(
    'label' => t('Commerce Price List item'),
    'entity class' => 'CommercePricelistItem',
    'controller class' => 'CommercePricelistItemController',
    'base table' => 'commerce_pricelist_item',
    'uri callback' => 'commerce_pricelist_item_uri',
    'access callback' => 'commerce_pricelist_entity_access',
    'metadata controller class' => FALSE,
    'fieldable' => FALSE,
    'uuid' => TRUE,
    'bundle keys' => array(
      'bundle' => 'item_id',
    ),
    'bundles' => array(),
    'entity keys' => array(
      'id' => 'item_id',
      'uuid' => 'uuid',
    ),
    'static cache' => TRUE,
    'view modes' => array(
      'full' => array(
        'label' => t('full'),
        'custom settings' => FALSE,
      ),
    ),
  );
  return $info;
}