You are here

function merci_restrictions_entity_info in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3

Implements hook_entity_info().

File

merci_restrictions/merci_restrictions.module, line 128

Code

function merci_restrictions_entity_info() {
  $info = array();
  $info['merci_restrictions'] = array(
    'label' => t('Merci restrictions'),
    'plural label' => t('Merci restrictions'),
    'module' => 'merci_restrictions',
    'base table' => 'merci_restrictions',
    'fieldable' => TRUE,
    'entity keys' => array(
      'id' => 'id',
      'bundle' => 'type',
      'label' => 'title',
    ),
    'bundle keys' => array(
      'bundle' => 'type',
    ),
    'bundles' => array(
      'merci_restrictions' => array(
        'label' => t('Merci restrictions'),
        // Provide a default administration path for Field UI, but not if 'admin'
        // has been explicitly set to NULL.
        'admin' => array(
          'path' => MERCI_RESTRICTIONS_TYPE_PATH,
        ),
      ),
    ),
    'admin ui' => array(
      'path' => 'merci_restrictions',
      'file' => 'merci_restrictions.pages.inc',
      'controller class' => 'MerciRestrictionsUIController',
    ),
    //'entity class' => 'MerciHours',
    'entity class' => 'MerciRestrictions',
    'controller class' => 'EntityAPIController',
    'exportable' => TRUE,
    'access callback' => 'merci_restrictions_access',
    'inline entity form' => array(
      'controller' => 'MerciRestrictionInlineEntityFormController',
    ),
  );
  return $info;
}