protected function ProductVariationFieldRenderer::buildAjaxReplacementClass in Commerce Core 8.2
Builds the AJAX replacement CSS class for a variation's field.
Parameters
string $field_name: The field name.
\Drupal\commerce_product\Entity\ProductVariationInterface $variation: The product variation.
Return value
string The CSS class.
1 call to ProductVariationFieldRenderer::buildAjaxReplacementClass()
- ProductVariationFieldRenderer::prepareForAjax in modules/
product/ src/ ProductVariationFieldRenderer.php - Prepares the rendered field for AJAX replacement.
File
- modules/
product/ src/ ProductVariationFieldRenderer.php, line 116
Class
Namespace
Drupal\commerce_productCode
protected function buildAjaxReplacementClass($field_name, ProductVariationInterface $variation) {
return 'product--variation-field--variation_' . $field_name . '__' . $variation
->getProductId();
}