You are here

function payment_entity_info in Payment 7

Implements hook_entity_info().

File

./payment.module, line 460
Hook implementations and shared functions.

Code

function payment_entity_info() {
  $entity_info['payment'] = array(
    'label' => t('Payment'),
    'controller class' => 'PaymentEntityController',
    'entity class' => 'Payment',
    'module' => 'payment',
    'base table' => 'payment',
    'entity keys' => array(
      'id' => 'pid',
    ),
    'label callback' => 'payment_label',
    'uri callback' => 'payment_uri',
    'fieldable' => TRUE,
    'bundles' => array(
      'payment' => array(
        'label' => t('Payment'),
        'admin' => array(
          'path' => 'admin/config/services/payment/payment',
          'access arguments' => array(
            'payment.payment.administer',
          ),
        ),
      ),
    ),
    'access callback' => 'payment_access',
  );
  $entity_info['payment_method'] = array(
    'label' => t('Payment method'),
    'controller class' => 'PaymentMethodEntityController',
    'features controller class' => 'PaymentMethodFeaturesController',
    'entity class' => 'PaymentMethod',
    'module' => 'payment',
    'base table' => 'payment_method',
    'entity keys' => array(
      'id' => 'pmid',
      'label' => 'title_specific',
      'name' => 'name',
    ),
    'uri callback' => 'payment_method_uri',
    'exportable' => TRUE,
    'access callback' => 'payment_method_access',
  );
  return $entity_info;
}