You are here

public function ProductAttributeFieldManagerInterface::getFieldMap in Commerce Core 8.2

Gets a map of attribute fields across variation types.

Parameters

string $variation_type_id: (Optional) The product variation type ID. When given, used to filter the returned maps.

Return value

array If a product variation type ID was given, a list of maps. Otherwise, a list of maps grouped by product variation type ID. Each map is an array with the following keys:

  • attribute_id: The attribute id;
  • field_name: The attribute field name.

The maps are ordered by the weight of the attribute fields on the default product variation form display.

1 method overrides ProductAttributeFieldManagerInterface::getFieldMap()
ProductAttributeFieldManager::getFieldMap in modules/product/src/ProductAttributeFieldManager.php
Gets a map of attribute fields across variation types.

File

modules/product/src/ProductAttributeFieldManagerInterface.php, line 45

Class

ProductAttributeFieldManagerInterface
Manages attribute fields.

Namespace

Drupal\commerce_product

Code

public function getFieldMap($variation_type_id = NULL);