You are here

public static function BulkVariationsCreatorInterface::getSkuSettings in Commerce Bulk 8

Helper method to get variation sku field form display settings.

Parameters

\Drupal\commerce_product\Entity\ProductVariation $variation: The commerce product variation.

Return value

array The last three elements are only present on ProductVariationSkuWidget:

  • "size": HTML size attribute value.
  • "placeholder": HTML placeholder attribute value.
  • "prefix": An optional prefix for the field value.
  • "suffix": An optional suffix for the field value.
  • "more_entropy": The length and therefore uniqueness of the field value.

See also

\Drupal\commerce\Plugin\Field\FieldWidget\ProductVariationSkuWidget

\Drupal\Core\Field\Plugin\Field\FieldWidget\StringTextfieldWidget

1 method overrides BulkVariationsCreatorInterface::getSkuSettings()
BulkVariationsCreator::getSkuSettings in src/BulkVariationsCreator.php
Helper method to get variation sku field form display settings.

File

src/BulkVariationsCreatorInterface.php, line 47

Class

BulkVariationsCreatorInterface
Manages variation combinations creation.

Namespace

Drupal\commerce_bulk

Code

public static function getSkuSettings(ProductVariation $variation);