You are here

function commerce_product_reference_field_formatter_info in Commerce Core 7

Implements hook_field_formatter_info().

File

modules/product_reference/commerce_product_reference.module, line 685
Defines a field type for referencing products from other entities.

Code

function commerce_product_reference_field_formatter_info() {
  return array(
    'commerce_product_reference_sku_link' => array(
      'label' => t('SKU (link)'),
      'description' => t('Display the SKU of the referenced product as a link to the node page.'),
      'field types' => array(
        'commerce_product_reference',
      ),
    ),
    'commerce_product_reference_sku_plain' => array(
      'label' => t('SKU (no link)'),
      'description' => t('Display the SKU of the referenced product as plain text.'),
      'field types' => array(
        'commerce_product_reference',
      ),
    ),
    'commerce_product_reference_title_link' => array(
      'label' => t('Title (link)'),
      'description' => t('Display the title of the referenced product as a link to the node page.'),
      'field types' => array(
        'commerce_product_reference',
      ),
    ),
    'commerce_product_reference_title_plain' => array(
      'label' => t('Title (no link)'),
      'description' => t('Display the title of the referenced product as plain text.'),
      'field types' => array(
        'commerce_product_reference',
      ),
    ),
    'commerce_product_reference_rendered_product' => array(
      'label' => t('Rendered product'),
      'description' => t('Display the rendered products in any available view mode.'),
      'field types' => array(
        'commerce_product_reference',
      ),
      'settings' => array(
        'view_mode' => 'full',
        'page' => TRUE,
      ),
    ),
  );
}