Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class AbstractItem implements ItemInterface
- {
- /**
- * @var Item
- */
- protected $item;
- /**
- * {@inheritdoc}
- */
- public function getItemData(Item $item)
- {
- $this->item = $item;
- return array_merge(
- ['product_type' => $item->getProductType()],
- $this->doGetItemData()
- );
- }
- /**
- * Get item data. Template method
- *
- * @return array
- */
- abstract protected function doGetItemData();
- }
- 'product_sku' => $this->item->getProduct()->getSku()
- 'product_sku' => $this->item->getProduct()->getId()
Add Comment
Please, Sign In to add comment