You are here

protected function ProductAttributeFieldManager::buildFieldName in Commerce Core 8.2

Builds the field name for the given attribute.

Parameters

\Drupal\commerce_product\Entity\ProductAttributeInterface $attribute: The product attribute.

Return value

string The field name.

3 calls to ProductAttributeFieldManager::buildFieldName()
ProductAttributeFieldManager::canDeleteField in modules/product/src/ProductAttributeFieldManager.php
Checks whether the attribute field for the given attribute can be deleted.
ProductAttributeFieldManager::createField in modules/product/src/ProductAttributeFieldManager.php
Creates an attribute field for the given attribute.
ProductAttributeFieldManager::deleteField in modules/product/src/ProductAttributeFieldManager.php
Deletes the attribute field for the given attribute.

File

modules/product/src/ProductAttributeFieldManager.php, line 259

Class

ProductAttributeFieldManager
Default implementation of the ProductAttributeFieldManagerInterface.

Namespace

Drupal\commerce_product

Code

protected function buildFieldName(ProductAttributeInterface $attribute) {
  return 'attribute_' . $attribute
    ->id();
}