You are here

function commerce_product_attributes_entity_info_alter in Commerce Product Attributes 7

Implementation of hook_entity_info_alter

We need an additional view_mode. By altering the entity we can add this view mode.

File

./commerce_product_attributes.module, line 30
This module adds some improvements to the Drupal Commerce core.

Code

function commerce_product_attributes_entity_info_alter(&$entity_info) {

  // Alter the commerce_order entity to add the additional view mode
  $entity_info['commerce_product']['view modes']['attribute_view'] = array(
    'label' => t('Attribute View'),
    'custom settings' => FALSE,
  );
}