32 lines
624 B
PHP
32 lines
624 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace KupShop\SalesBundle\Entity\Wrapper;
|
|
|
|
use KupShop\KupShopBundle\Template\ObjectWrapper;
|
|
use KupShop\SalesBundle\Entity\SaleItem;
|
|
|
|
class SaleItemWrapper extends ObjectWrapper
|
|
{
|
|
/** @var SaleItem */
|
|
protected $object;
|
|
|
|
public static $objectType = SaleItem::class;
|
|
|
|
public function field_id_product(): ?int
|
|
{
|
|
return $this->object->productId;
|
|
}
|
|
|
|
public function field_id_variation(): ?int
|
|
{
|
|
return $this->object->variationId;
|
|
}
|
|
|
|
public function field_product(): ?\Product
|
|
{
|
|
return $this->object->getProduct();
|
|
}
|
|
}
|