<?php
/**
* Inheritance: yes
* Variants: yes
*
* Fields Summary:
* - ProductType [select]
* - Visibility [select]
* - Name [input]
* - Images [imageGallery]
* - SKU [input]
* - BasePrice [quantityValue]
* - MinBasePrice [calculatedValue]
* - PriceSystemRuleRelation [manyToOneRelation]
* - PriceSystemRulePath [calculatedValue]
* - PriceSystemRuleId [numeric]
* - Division [calculatedValue]
* - ShortDescription [wysiwyg]
* - Categories [manyToManyObjectRelation]
* - RelatedProducts [manyToManyObjectRelation]
* - PurchasedTogether [manyToManyObjectRelation]
* - ReplacementParts [manyToManyObjectRelation]
* - Products [manyToManyObjectRelation]
* - AdditionalContent [fieldcollections]
* - Weight [quantityValue]
* - Width [quantityValue]
* - Height [quantityValue]
* - Length [quantityValue]
* - URLKey [input]
* - URLPath [input]
* - MetaTitle [input]
* - MetaDescription [textarea]
* - MetaKeywords [input]
* - OgImage [image]
* - OgTitle [input]
* - OgDescription [textarea]
* - StockStatus [select]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\Product\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByProductType($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByVisibility($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByName($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getBySKU($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByPriceSystemRuleRelation($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByPriceSystemRuleId($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByShortDescription($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByCategories($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByRelatedProducts($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByPurchasedTogether($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByReplacementParts($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByProducts($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByURLKey($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByURLPath($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByMetaTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByMetaDescription($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByMetaKeywords($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByOgImage($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByOgTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByOgDescription($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByStockStatus($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class Product extends \App\Model\Product\ProductBase
{
protected $o_classId = "Product";
protected $o_className = "Product";
protected $ProductType;
protected $Visibility;
protected $Name;
protected $Images;
protected $SKU;
protected $BasePrice;
protected $PriceSystemRuleRelation;
protected $PriceSystemRuleId;
protected $ShortDescription;
protected $Categories;
protected $RelatedProducts;
protected $PurchasedTogether;
protected $ReplacementParts;
protected $Products;
protected $AdditionalContent;
protected $Weight;
protected $Width;
protected $Height;
protected $Length;
protected $URLKey;
protected $URLPath;
protected $MetaTitle;
protected $MetaDescription;
protected $MetaKeywords;
protected $OgImage;
protected $OgTitle;
protected $OgDescription;
protected $StockStatus;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\Product
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get ProductType - Product Type
* @return string|null
*/
public function getProductType(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("ProductType");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->ProductType;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("ProductType")->isEmpty($data)) {
try {
return $this->getValueFromParent("ProductType");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set ProductType - Product Type
* @param string|null $ProductType
* @return \Pimcore\Model\DataObject\Product
*/
public function setProductType(?string $ProductType)
{
$this->ProductType = $ProductType;
return $this;
}
/**
* Get Visibility - Visibility
* @return string|null
*/
public function getVisibility(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Visibility");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Visibility;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("Visibility")->isEmpty($data)) {
try {
return $this->getValueFromParent("Visibility");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Visibility - Visibility
* @param string|null $Visibility
* @return \Pimcore\Model\DataObject\Product
*/
public function setVisibility(?string $Visibility)
{
$this->Visibility = $Visibility;
return $this;
}
/**
* Get Name - Name
* @return string|null
*/
public function getName(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Name");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Name;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("Name")->isEmpty($data)) {
try {
return $this->getValueFromParent("Name");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Name - Name
* @param string|null $Name
* @return \Pimcore\Model\DataObject\Product
*/
public function setName(?string $Name)
{
$this->Name = $Name;
return $this;
}
/**
* Get Images - Images
* @return \Pimcore\Model\DataObject\Data\ImageGallery|null
*/
public function getImages(): ?\Pimcore\Model\DataObject\Data\ImageGallery
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Images");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Images;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("Images")->isEmpty($data)) {
try {
return $this->getValueFromParent("Images");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Images - Images
* @param \Pimcore\Model\DataObject\Data\ImageGallery|null $Images
* @return \Pimcore\Model\DataObject\Product
*/
public function setImages(?\Pimcore\Model\DataObject\Data\ImageGallery $Images)
{
$this->Images = $Images;
return $this;
}
/**
* Get SKU - SKU
* @return string|null
*/
public function getSKU(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("SKU");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->SKU;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("SKU")->isEmpty($data)) {
try {
return $this->getValueFromParent("SKU");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set SKU - SKU
* @param string|null $SKU
* @return \Pimcore\Model\DataObject\Product
*/
public function setSKU(?string $SKU)
{
$this->SKU = $SKU;
return $this;
}
/**
* Get BasePrice - Base Price
* @return \Pimcore\Model\DataObject\Data\QuantityValue|null
*/
public function getBasePrice(): ?\Pimcore\Model\DataObject\Data\QuantityValue
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("BasePrice");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->BasePrice;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("BasePrice")->isEmpty($data)) {
try {
return $this->getValueFromParent("BasePrice");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set BasePrice - Base Price
* @param \Pimcore\Model\DataObject\Data\QuantityValue|null $BasePrice
* @return \Pimcore\Model\DataObject\Product
*/
public function setBasePrice(?\Pimcore\Model\DataObject\Data\QuantityValue $BasePrice)
{
$this->BasePrice = $BasePrice;
return $this;
}
/**
* Get MinBasePrice - MinBasePrice
* @return \Pimcore\Model\DataObject\Data\CalculatedValue|null
*/
public function getMinBasePrice()
{
$data = new \Pimcore\Model\DataObject\Data\CalculatedValue('MinBasePrice');
$data->setContextualData("object", null, null, null);
$object = $this;
$data = \Pimcore\Model\DataObject\Service::getCalculatedFieldValue($object, $data);
return $data;
}
/**
* Set MinBasePrice - MinBasePrice
* @param \Pimcore\Model\DataObject\Data\CalculatedValue|null $MinBasePrice
* @return \Pimcore\Model\DataObject\Product
*/
public function setMinBasePrice($MinBasePrice)
{
return $this;
}
/**
* Get PriceSystemRuleRelation - PriceSystemRule
* @return \Pimcore\Model\DataObject\PriceSystemRule|null
*/
public function getPriceSystemRuleRelation(): ?\Pimcore\Model\Element\AbstractElement
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("PriceSystemRuleRelation");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("PriceSystemRuleRelation")->preGetData($this);
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("PriceSystemRuleRelation")->isEmpty($data)) {
try {
return $this->getValueFromParent("PriceSystemRuleRelation");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set PriceSystemRuleRelation - PriceSystemRule
* @param \Pimcore\Model\DataObject\PriceSystemRule|null $PriceSystemRuleRelation
* @return \Pimcore\Model\DataObject\Product
*/
public function setPriceSystemRuleRelation(?\Pimcore\Model\Element\AbstractElement $PriceSystemRuleRelation)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("PriceSystemRuleRelation");
$inheritValues = self::getGetInheritedValues();
self::setGetInheritedValues(false);
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getPriceSystemRuleRelation();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
self::setGetInheritedValues($inheritValues);
$isEqual = $fd->isEqual($currentData, $PriceSystemRuleRelation);
if (!$isEqual) {
$this->markFieldDirty("PriceSystemRuleRelation", true);
}
$this->PriceSystemRuleRelation = $fd->preSetData($this, $PriceSystemRuleRelation);
return $this;
}
/**
* Get PriceSystemRulePath - PricingSystemRuleId
* @return \Pimcore\Model\DataObject\Data\CalculatedValue|null
*/
public function getPriceSystemRulePath()
{
$data = new \Pimcore\Model\DataObject\Data\CalculatedValue('PriceSystemRulePath');
$data->setContextualData("object", null, null, null);
$object = $this;
$data = \Pimcore\Model\DataObject\Service::getCalculatedFieldValue($object, $data);
return $data;
}
/**
* Set PriceSystemRulePath - PricingSystemRuleId
* @param \Pimcore\Model\DataObject\Data\CalculatedValue|null $PriceSystemRulePath
* @return \Pimcore\Model\DataObject\Product
*/
public function setPriceSystemRulePath($PriceSystemRulePath)
{
return $this;
}
/**
* Get PriceSystemRuleId - PriceSystemRuleId
* @return float|null
*/
public function getPriceSystemRuleId(): ?float
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("PriceSystemRuleId");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->PriceSystemRuleId;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("PriceSystemRuleId")->isEmpty($data)) {
try {
return $this->getValueFromParent("PriceSystemRuleId");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set PriceSystemRuleId - PriceSystemRuleId
* @param float|null $PriceSystemRuleId
* @return \Pimcore\Model\DataObject\Product
*/
public function setPriceSystemRuleId(?float $PriceSystemRuleId)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
$fd = $this->getClass()->getFieldDefinition("PriceSystemRuleId");
$this->PriceSystemRuleId = $fd->preSetData($this, $PriceSystemRuleId);
return $this;
}
/**
* Get Division - Division
* @return \Pimcore\Model\DataObject\Data\CalculatedValue|null
*/
public function getDivision()
{
$data = new \Pimcore\Model\DataObject\Data\CalculatedValue('Division');
$data->setContextualData("object", null, null, null);
$object = $this;
$data = \Pimcore\Model\DataObject\Service::getCalculatedFieldValue($object, $data);
return $data;
}
/**
* Set Division - Division
* @param \Pimcore\Model\DataObject\Data\CalculatedValue|null $Division
* @return \Pimcore\Model\DataObject\Product
*/
public function setDivision($Division)
{
return $this;
}
/**
* Get ShortDescription - Short Description
* @return string|null
*/
public function getShortDescription(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("ShortDescription");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("ShortDescription")->preGetData($this);
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("ShortDescription")->isEmpty($data)) {
try {
return $this->getValueFromParent("ShortDescription");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set ShortDescription - Short Description
* @param string|null $ShortDescription
* @return \Pimcore\Model\DataObject\Product
*/
public function setShortDescription(?string $ShortDescription)
{
$this->ShortDescription = $ShortDescription;
return $this;
}
/**
* Get Categories - Categories
* @return \Pimcore\Model\DataObject\Category[]
*/
public function getCategories(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Categories");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("Categories")->preGetData($this);
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("Categories")->isEmpty($data)) {
try {
return $this->getValueFromParent("Categories");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Categories - Categories
* @param \Pimcore\Model\DataObject\Category[] $Categories
* @return \Pimcore\Model\DataObject\Product
*/
public function setCategories(?array $Categories)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("Categories");
$inheritValues = self::getGetInheritedValues();
self::setGetInheritedValues(false);
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getCategories();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
self::setGetInheritedValues($inheritValues);
$isEqual = $fd->isEqual($currentData, $Categories);
if (!$isEqual) {
$this->markFieldDirty("Categories", true);
}
$this->Categories = $fd->preSetData($this, $Categories);
return $this;
}
/**
* Get RelatedProducts - RelatedProducts
* @return \Pimcore\Model\DataObject\Product[]
*/
public function getRelatedProducts(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("RelatedProducts");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("RelatedProducts")->preGetData($this);
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("RelatedProducts")->isEmpty($data)) {
try {
return $this->getValueFromParent("RelatedProducts");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set RelatedProducts - RelatedProducts
* @param \Pimcore\Model\DataObject\Product[] $RelatedProducts
* @return \Pimcore\Model\DataObject\Product
*/
public function setRelatedProducts(?array $RelatedProducts)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("RelatedProducts");
$inheritValues = self::getGetInheritedValues();
self::setGetInheritedValues(false);
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getRelatedProducts();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
self::setGetInheritedValues($inheritValues);
$isEqual = $fd->isEqual($currentData, $RelatedProducts);
if (!$isEqual) {
$this->markFieldDirty("RelatedProducts", true);
}
$this->RelatedProducts = $fd->preSetData($this, $RelatedProducts);
return $this;
}
/**
* Get PurchasedTogether - PurchasedTogether
* @return \Pimcore\Model\DataObject\Product[]
*/
public function getPurchasedTogether(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("PurchasedTogether");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("PurchasedTogether")->preGetData($this);
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("PurchasedTogether")->isEmpty($data)) {
try {
return $this->getValueFromParent("PurchasedTogether");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set PurchasedTogether - PurchasedTogether
* @param \Pimcore\Model\DataObject\Product[] $PurchasedTogether
* @return \Pimcore\Model\DataObject\Product
*/
public function setPurchasedTogether(?array $PurchasedTogether)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("PurchasedTogether");
$inheritValues = self::getGetInheritedValues();
self::setGetInheritedValues(false);
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getPurchasedTogether();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
self::setGetInheritedValues($inheritValues);
$isEqual = $fd->isEqual($currentData, $PurchasedTogether);
if (!$isEqual) {
$this->markFieldDirty("PurchasedTogether", true);
}
$this->PurchasedTogether = $fd->preSetData($this, $PurchasedTogether);
return $this;
}
/**
* Get ReplacementParts - ReplacementParts
* @return \Pimcore\Model\DataObject\Product[]
*/
public function getReplacementParts(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("ReplacementParts");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("ReplacementParts")->preGetData($this);
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("ReplacementParts")->isEmpty($data)) {
try {
return $this->getValueFromParent("ReplacementParts");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set ReplacementParts - ReplacementParts
* @param \Pimcore\Model\DataObject\Product[] $ReplacementParts
* @return \Pimcore\Model\DataObject\Product
*/
public function setReplacementParts(?array $ReplacementParts)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("ReplacementParts");
$inheritValues = self::getGetInheritedValues();
self::setGetInheritedValues(false);
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getReplacementParts();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
self::setGetInheritedValues($inheritValues);
$isEqual = $fd->isEqual($currentData, $ReplacementParts);
if (!$isEqual) {
$this->markFieldDirty("ReplacementParts", true);
}
$this->ReplacementParts = $fd->preSetData($this, $ReplacementParts);
return $this;
}
/**
* Get Products - Products
* @return \Pimcore\Model\DataObject\Product[]
*/
public function getProducts(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Products");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("Products")->preGetData($this);
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("Products")->isEmpty($data)) {
try {
return $this->getValueFromParent("Products");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Products - Products
* @param \Pimcore\Model\DataObject\Product[] $Products
* @return \Pimcore\Model\DataObject\Product
*/
public function setProducts(?array $Products)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("Products");
$inheritValues = self::getGetInheritedValues();
self::setGetInheritedValues(false);
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getProducts();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
self::setGetInheritedValues($inheritValues);
$isEqual = $fd->isEqual($currentData, $Products);
if (!$isEqual) {
$this->markFieldDirty("Products", true);
}
$this->Products = $fd->preSetData($this, $Products);
return $this;
}
/**
* @return \Pimcore\Model\DataObject\Fieldcollection|null
*/
public function getAdditionalContent(): ?\Pimcore\Model\DataObject\Fieldcollection
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("AdditionalContent");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("AdditionalContent")->preGetData($this);
return $data;
}
/**
* Set AdditionalContent - AdditionalContent
* @param \Pimcore\Model\DataObject\Fieldcollection|null $AdditionalContent
* @return \Pimcore\Model\DataObject\Product
*/
public function setAdditionalContent(?\Pimcore\Model\DataObject\Fieldcollection $AdditionalContent)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Fieldcollections $fd */
$fd = $this->getClass()->getFieldDefinition("AdditionalContent");
$this->AdditionalContent = $fd->preSetData($this, $AdditionalContent);
return $this;
}
/**
* Get Weight - Weight
* @return \Pimcore\Model\DataObject\Data\QuantityValue|null
*/
public function getWeight(): ?\Pimcore\Model\DataObject\Data\QuantityValue
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Weight");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Weight;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("Weight")->isEmpty($data)) {
try {
return $this->getValueFromParent("Weight");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Weight - Weight
* @param \Pimcore\Model\DataObject\Data\QuantityValue|null $Weight
* @return \Pimcore\Model\DataObject\Product
*/
public function setWeight(?\Pimcore\Model\DataObject\Data\QuantityValue $Weight)
{
$this->Weight = $Weight;
return $this;
}
/**
* Get Width - Width
* @return \Pimcore\Model\DataObject\Data\QuantityValue|null
*/
public function getWidth(): ?\Pimcore\Model\DataObject\Data\QuantityValue
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Width");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Width;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("Width")->isEmpty($data)) {
try {
return $this->getValueFromParent("Width");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Width - Width
* @param \Pimcore\Model\DataObject\Data\QuantityValue|null $Width
* @return \Pimcore\Model\DataObject\Product
*/
public function setWidth(?\Pimcore\Model\DataObject\Data\QuantityValue $Width)
{
$this->Width = $Width;
return $this;
}
/**
* Get Height - Height
* @return \Pimcore\Model\DataObject\Data\QuantityValue|null
*/
public function getHeight(): ?\Pimcore\Model\DataObject\Data\QuantityValue
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Height");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Height;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("Height")->isEmpty($data)) {
try {
return $this->getValueFromParent("Height");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Height - Height
* @param \Pimcore\Model\DataObject\Data\QuantityValue|null $Height
* @return \Pimcore\Model\DataObject\Product
*/
public function setHeight(?\Pimcore\Model\DataObject\Data\QuantityValue $Height)
{
$this->Height = $Height;
return $this;
}
/**
* Get Length - Length
* @return \Pimcore\Model\DataObject\Data\QuantityValue|null
*/
public function getLength(): ?\Pimcore\Model\DataObject\Data\QuantityValue
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Length");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Length;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("Length")->isEmpty($data)) {
try {
return $this->getValueFromParent("Length");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Length - Length
* @param \Pimcore\Model\DataObject\Data\QuantityValue|null $Length
* @return \Pimcore\Model\DataObject\Product
*/
public function setLength(?\Pimcore\Model\DataObject\Data\QuantityValue $Length)
{
$this->Length = $Length;
return $this;
}
/**
* Get URLKey - URL Key
* @return string|null
*/
public function getURLKey(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("URLKey");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->URLKey;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("URLKey")->isEmpty($data)) {
try {
return $this->getValueFromParent("URLKey");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set URLKey - URL Key
* @param string|null $URLKey
* @return \Pimcore\Model\DataObject\Product
*/
public function setURLKey(?string $URLKey)
{
$this->URLKey = $URLKey;
return $this;
}
/**
* Get URLPath - URL Path
* @return string|null
*/
public function getURLPath(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("URLPath");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->URLPath;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("URLPath")->isEmpty($data)) {
try {
return $this->getValueFromParent("URLPath");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set URLPath - URL Path
* @param string|null $URLPath
* @return \Pimcore\Model\DataObject\Product
*/
public function setURLPath(?string $URLPath)
{
$this->URLPath = $URLPath;
return $this;
}
/**
* Get MetaTitle - Meta Title
* @return string|null
*/
public function getMetaTitle(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("MetaTitle");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->MetaTitle;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("MetaTitle")->isEmpty($data)) {
try {
return $this->getValueFromParent("MetaTitle");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set MetaTitle - Meta Title
* @param string|null $MetaTitle
* @return \Pimcore\Model\DataObject\Product
*/
public function setMetaTitle(?string $MetaTitle)
{
$this->MetaTitle = $MetaTitle;
return $this;
}
/**
* Get MetaDescription - Meta Description
* @return string|null
*/
public function getMetaDescription(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("MetaDescription");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->MetaDescription;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("MetaDescription")->isEmpty($data)) {
try {
return $this->getValueFromParent("MetaDescription");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set MetaDescription - Meta Description
* @param string|null $MetaDescription
* @return \Pimcore\Model\DataObject\Product
*/
public function setMetaDescription(?string $MetaDescription)
{
$this->MetaDescription = $MetaDescription;
return $this;
}
/**
* Get MetaKeywords - Meta Keywords
* @return string|null
*/
public function getMetaKeywords(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("MetaKeywords");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->MetaKeywords;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("MetaKeywords")->isEmpty($data)) {
try {
return $this->getValueFromParent("MetaKeywords");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set MetaKeywords - Meta Keywords
* @param string|null $MetaKeywords
* @return \Pimcore\Model\DataObject\Product
*/
public function setMetaKeywords(?string $MetaKeywords)
{
$this->MetaKeywords = $MetaKeywords;
return $this;
}
/**
* Get OgImage - OgImage
* @return \Pimcore\Model\Asset\Image|null
*/
public function getOgImage(): ?\Pimcore\Model\Asset\Image
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("OgImage");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->OgImage;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("OgImage")->isEmpty($data)) {
try {
return $this->getValueFromParent("OgImage");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set OgImage - OgImage
* @param \Pimcore\Model\Asset\Image|null $OgImage
* @return \Pimcore\Model\DataObject\Product
*/
public function setOgImage(?\Pimcore\Model\Asset\Image $OgImage)
{
$this->OgImage = $OgImage;
return $this;
}
/**
* Get OgTitle - OgTitle
* @return string|null
*/
public function getOgTitle(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("OgTitle");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->OgTitle;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("OgTitle")->isEmpty($data)) {
try {
return $this->getValueFromParent("OgTitle");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set OgTitle - OgTitle
* @param string|null $OgTitle
* @return \Pimcore\Model\DataObject\Product
*/
public function setOgTitle(?string $OgTitle)
{
$this->OgTitle = $OgTitle;
return $this;
}
/**
* Get OgDescription - OgDescription
* @return string|null
*/
public function getOgDescription(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("OgDescription");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->OgDescription;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("OgDescription")->isEmpty($data)) {
try {
return $this->getValueFromParent("OgDescription");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set OgDescription - OgDescription
* @param string|null $OgDescription
* @return \Pimcore\Model\DataObject\Product
*/
public function setOgDescription(?string $OgDescription)
{
$this->OgDescription = $OgDescription;
return $this;
}
/**
* Get StockStatus - StockStatus
* @return string|null
*/
public function getStockStatus(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("StockStatus");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->StockStatus;
if (\Pimcore\Model\DataObject::doGetInheritedValues() && $this->getClass()->getFieldDefinition("StockStatus")->isEmpty($data)) {
try {
return $this->getValueFromParent("StockStatus");
} catch (InheritanceParentNotFoundException $e) {
// no data from parent available, continue ...
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set StockStatus - StockStatus
* @param string|null $StockStatus
* @return \Pimcore\Model\DataObject\Product
*/
public function setStockStatus(?string $StockStatus)
{
$this->StockStatus = $StockStatus;
return $this;
}
}