public function supports(string
$type): bool
{ return $type === LineItem::PRODUCT_LINE_ITEM_TYPE;
} /**
* @param array<mixed> $data
*/
public function create(array
$data, SalesChannelContext
$context): LineItem
{ $lineItem =
new LineItem($data['id'
], LineItem::PRODUCT_LINE_ITEM_TYPE,
$data['referencedId'
] ??
$data['id'
],
$data['quantity'
] ?? 1
);
$lineItem->
markModified();
$lineItem->
setRemovable(true
);
$lineItem->
setStackable(true
);
$this->
update($lineItem,
$data,
$context);
return $lineItem;
} /**
* @param array<mixed> $data
*/