You are here

function commerce_views_display_field_wrapper_replacement_class in Commerce Views Display 7

Return the replacement class basaed on display info

2 calls to commerce_views_display_field_wrapper_replacement_class()
commerce_views_display_add_to_cart_form_attributes_refresh in ./commerce_views_display.module
Ajax callback: returns AJAX commands when an attribute widget is changed.
commerce_views_display_field_wrapper_classes in ./commerce_views_display.module
Return an array of wrapper classes based on display info

File

./commerce_views_display.module, line 189
Provides a views display plugin to render an add to cart form

Code

function commerce_views_display_field_wrapper_replacement_class($entity_type, $entity, $field_name, $display_info) {
  if (!empty($display_info['product_display_id']) && !empty($display_info['field_id'])) {
    return drupal_html_class(implode('-', array(
      $display_info['product_display_id'],
      'product',
      $display_info['field_id'],
    )));
  }
  return '';
}