You are here

public function PreparedAttribute::toArray in Commerce Core 8.2

Gets the array representation of the prepared attribute.

Return value

array The array representation of the prepared attribute.

File

modules/product/src/PreparedAttribute.php, line 126

Class

PreparedAttribute
Represents a prepared attribute.

Namespace

Drupal\commerce_product

Code

public function toArray() : array {
  return [
    'id' => $this->id,
    'label' => $this->label,
    'element_type' => $this->elementType,
    'required' => $this->required,
    'values' => $this->values,
  ];
}