You are here

function commerce_order_types_entity_info_alter in Commerce Order Types 7

Implements hook_entity_info_alter().

File

./commerce_order_types.module, line 88
Provides a UI for creating and managing custom order types.

Code

function commerce_order_types_entity_info_alter(&$entity_info) {
  foreach (commerce_order_types_order_types() as $type => $info) {
    $entity_info['commerce_order']['bundles'][$type] = array(
      'label' => $info->name,
      'admin' => array(
        'path' => 'admin/commerce/config/order-types/manage/%commerce_order_type',
        'real path' => 'admin/commerce/config/order-types/manage/' . $type,
        'bundle argument' => 5,
        'access arguments' => array(
          'administer order types',
        ),
      ),
    );
  }
}