var/classes/DataObject/Product.php line 961

Open in your IDE?
  1. <?php
  2. /**
  3. * Inheritance: no
  4. * Variants: no
  5. Fields Summary:
  6. - guid [input]
  7. - article [input]
  8. - same [manyToManyObjectRelation]
  9. - localizedfields [localizedfields]
  10. -- name [input]
  11. -- price [numeric]
  12. -- isAviable [booleanSelect]
  13. -- video [video]
  14. -- description [wysiwyg]
  15. -- gallery [imageGallery]
  16. -- highlights [block]
  17. --- highlight [textarea]
  18. -- brandCountry [input]
  19. -- manufacturerCountry [input]
  20. -- material [input]
  21. -- complectation [input]
  22. -- colour [input]
  23. -- style [input]
  24. -- stickers [imageGallery]
  25. -- wasteSetIncluded [input]
  26. -- thermostatic [input]
  27. -- concealedInstallation [input]
  28. -- mixerType [input]
  29. - brand [manyToOneRelation]
  30. - collection [manyToOneRelation]
  31. - productType [manyToOneRelation]
  32. - barCode [input]
  33. - releaseDate [datetime]
  34. - previewOne [image]
  35. - previewTwo [image]
  36. - internationalGallery [imageGallery]
  37. - warranty [numeric]
  38. - depth [numeric]
  39. - width [numeric]
  40. - height [numeric]
  41. - packageDepth [numeric]
  42. - packageWidth [numeric]
  43. - packageHeight [numeric]
  44. - weight [numeric]
  45. - categoryParameters [classificationstore]
  46. - categoryProperties [classificationstore]
  47. - categories [manyToManyObjectRelation]
  48. - awards [manyToManyObjectRelation]
  49. - AmazonProduct [reverseObjectRelation]
  50. - manuals [manyToManyRelation]
  51. - schemes [imageGallery]
  52. - scheme [image]
  53. */
  54. namespace Pimcore\Model\DataObject;
  55. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  56. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  57. /**
  58. * @method static \Pimcore\Model\DataObject\Product\Listing getList()
  59. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByGuid($value, $limit = 0, $offset = 0, $objectTypes = null)
  60. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByArticle($value, $limit = 0, $offset = 0, $objectTypes = null)
  61. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getBySame($value, $limit = 0, $offset = 0, $objectTypes = null)
  62. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  63. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByName($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  64. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByPrice($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  65. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByIsAviable($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  66. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByVideo($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  67. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByDescription($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  68. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByGallery($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  69. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByHighlights($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  70. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByBrandCountry($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  71. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByManufacturerCountry($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  72. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByMaterial($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  73. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByComplectation($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  74. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByColour($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  75. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByStyle($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  76. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByStickers($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  77. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByWasteSetIncluded($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  78. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByThermostatic($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  79. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByConcealedInstallation($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  80. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByMixerType($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  81. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByBrand($value, $limit = 0, $offset = 0, $objectTypes = null)
  82. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByCollection($value, $limit = 0, $offset = 0, $objectTypes = null)
  83. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByProductType($value, $limit = 0, $offset = 0, $objectTypes = null)
  84. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByBarCode($value, $limit = 0, $offset = 0, $objectTypes = null)
  85. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByReleaseDate($value, $limit = 0, $offset = 0, $objectTypes = null)
  86. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByPreviewOne($value, $limit = 0, $offset = 0, $objectTypes = null)
  87. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByPreviewTwo($value, $limit = 0, $offset = 0, $objectTypes = null)
  88. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByWarranty($value, $limit = 0, $offset = 0, $objectTypes = null)
  89. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByDepth($value, $limit = 0, $offset = 0, $objectTypes = null)
  90. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByWidth($value, $limit = 0, $offset = 0, $objectTypes = null)
  91. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByHeight($value, $limit = 0, $offset = 0, $objectTypes = null)
  92. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByPackageDepth($value, $limit = 0, $offset = 0, $objectTypes = null)
  93. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByPackageWidth($value, $limit = 0, $offset = 0, $objectTypes = null)
  94. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByPackageHeight($value, $limit = 0, $offset = 0, $objectTypes = null)
  95. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByWeight($value, $limit = 0, $offset = 0, $objectTypes = null)
  96. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByCategories($value, $limit = 0, $offset = 0, $objectTypes = null)
  97. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByAwards($value, $limit = 0, $offset = 0, $objectTypes = null)
  98. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByAmazonProduct($value, $limit = 0, $offset = 0, $objectTypes = null)
  99. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByManuals($value, $limit = 0, $offset = 0, $objectTypes = null)
  100. * @method static \Pimcore\Model\DataObject\Product\Listing|\Pimcore\Model\DataObject\Product|null getByScheme($value, $limit = 0, $offset = 0, $objectTypes = null)
  101. */
  102. class Product extends Concrete
  103. {
  104. protected $o_classId = "35";
  105. protected $o_className = "Product";
  106. protected $guid;
  107. protected $article;
  108. protected $same;
  109. protected $localizedfields;
  110. protected $brand;
  111. protected $collection;
  112. protected $productType;
  113. protected $barCode;
  114. protected $releaseDate;
  115. protected $previewOne;
  116. protected $previewTwo;
  117. protected $internationalGallery;
  118. protected $warranty;
  119. protected $depth;
  120. protected $width;
  121. protected $height;
  122. protected $packageDepth;
  123. protected $packageWidth;
  124. protected $packageHeight;
  125. protected $weight;
  126. protected $categoryParameters;
  127. protected $categoryProperties;
  128. protected $categories;
  129. protected $awards;
  130. protected $manuals;
  131. protected $schemes;
  132. protected $scheme;
  133. /**
  134. * @param array $values
  135. * @return \Pimcore\Model\DataObject\Product
  136. */
  137. public static function create($values = array()) {
  138. $object = new static();
  139. $object->setValues($values);
  140. return $object;
  141. }
  142. /**
  143. * Get guid - guid
  144. * @return string|null
  145. */
  146. public function getGuid(): ?string
  147. {
  148. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  149. $preValue = $this->preGetValue("guid");
  150. if ($preValue !== null) {
  151. return $preValue;
  152. }
  153. }
  154. $data = $this->guid;
  155. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  156. return $data->getPlain();
  157. }
  158. return $data;
  159. }
  160. /**
  161. * Set guid - guid
  162. * @param string|null $guid
  163. * @return \Pimcore\Model\DataObject\Product
  164. */
  165. public function setGuid(?string $guid)
  166. {
  167. $this->guid = $guid;
  168. return $this;
  169. }
  170. /**
  171. * Get article - article
  172. * @return string|null
  173. */
  174. public function getArticle(): ?string
  175. {
  176. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  177. $preValue = $this->preGetValue("article");
  178. if ($preValue !== null) {
  179. return $preValue;
  180. }
  181. }
  182. $data = $this->article;
  183. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  184. return $data->getPlain();
  185. }
  186. return $data;
  187. }
  188. /**
  189. * Set article - article
  190. * @param string|null $article
  191. * @return \Pimcore\Model\DataObject\Product
  192. */
  193. public function setArticle(?string $article)
  194. {
  195. $this->article = $article;
  196. return $this;
  197. }
  198. /**
  199. * Get same - same
  200. * @return \Pimcore\Model\DataObject\Product[]
  201. */
  202. public function getSame(): array
  203. {
  204. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  205. $preValue = $this->preGetValue("same");
  206. if ($preValue !== null) {
  207. return $preValue;
  208. }
  209. }
  210. $data = $this->getClass()->getFieldDefinition("same")->preGetData($this);
  211. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  212. return $data->getPlain();
  213. }
  214. return $data;
  215. }
  216. /**
  217. * Set same - same
  218. * @param \Pimcore\Model\DataObject\Product[] $same
  219. * @return \Pimcore\Model\DataObject\Product
  220. */
  221. public function setSame(?array $same)
  222. {
  223. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  224. $fd = $this->getClass()->getFieldDefinition("same");
  225. $hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  226. \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  227. $currentData = $this->getSame();
  228. \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  229. $isEqual = $fd->isEqual($currentData, $same);
  230. if (!$isEqual) {
  231. $this->markFieldDirty("same", true);
  232. }
  233. $this->same = $fd->preSetData($this, $same);
  234. return $this;
  235. }
  236. /**
  237. * Get localizedfields -
  238. * @return \Pimcore\Model\DataObject\Localizedfield|null
  239. */
  240. public function getLocalizedfields(): ?\Pimcore\Model\DataObject\Localizedfield
  241. {
  242. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  243. $preValue = $this->preGetValue("localizedfields");
  244. if ($preValue !== null) {
  245. return $preValue;
  246. }
  247. }
  248. $data = $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
  249. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  250. return $data->getPlain();
  251. }
  252. return $data;
  253. }
  254. /**
  255. * Get name - name
  256. * @return string|null
  257. */
  258. public function getName($language = null): ?string
  259. {
  260. $data = $this->getLocalizedfields()->getLocalizedValue("name", $language);
  261. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  262. $preValue = $this->preGetValue("name");
  263. if ($preValue !== null) {
  264. return $preValue;
  265. }
  266. }
  267. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  268. return $data->getPlain();
  269. }
  270. return $data;
  271. }
  272. /**
  273. * Get price - price
  274. * @return float|null
  275. */
  276. public function getPrice($language = null): ?float
  277. {
  278. $data = $this->getLocalizedfields()->getLocalizedValue("price", $language);
  279. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  280. $preValue = $this->preGetValue("price");
  281. if ($preValue !== null) {
  282. return $preValue;
  283. }
  284. }
  285. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  286. return $data->getPlain();
  287. }
  288. return $data;
  289. }
  290. /**
  291. * Get isAviable - Is aviable
  292. * @return bool|null
  293. */
  294. public function getIsAviable($language = null): ?bool
  295. {
  296. $data = $this->getLocalizedfields()->getLocalizedValue("isAviable", $language);
  297. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  298. $preValue = $this->preGetValue("isAviable");
  299. if ($preValue !== null) {
  300. return $preValue;
  301. }
  302. }
  303. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  304. return $data->getPlain();
  305. }
  306. return $data;
  307. }
  308. /**
  309. * Get video - video
  310. * @return \Pimcore\Model\DataObject\Data\Video|null
  311. */
  312. public function getVideo($language = null): ?\Pimcore\Model\DataObject\Data\Video
  313. {
  314. $data = $this->getLocalizedfields()->getLocalizedValue("video", $language);
  315. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  316. $preValue = $this->preGetValue("video");
  317. if ($preValue !== null) {
  318. return $preValue;
  319. }
  320. }
  321. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  322. return $data->getPlain();
  323. }
  324. return $data;
  325. }
  326. /**
  327. * Get description - description
  328. * @return string|null
  329. */
  330. public function getDescription($language = null): ?string
  331. {
  332. $data = $this->getLocalizedfields()->getLocalizedValue("description", $language);
  333. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  334. $preValue = $this->preGetValue("description");
  335. if ($preValue !== null) {
  336. return $preValue;
  337. }
  338. }
  339. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  340. return $data->getPlain();
  341. }
  342. return $data;
  343. }
  344. /**
  345. * Get gallery - gallery
  346. * @return \Pimcore\Model\DataObject\Data\ImageGallery|null
  347. */
  348. public function getGallery($language = null): ?\Pimcore\Model\DataObject\Data\ImageGallery
  349. {
  350. $data = $this->getLocalizedfields()->getLocalizedValue("gallery", $language);
  351. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  352. $preValue = $this->preGetValue("gallery");
  353. if ($preValue !== null) {
  354. return $preValue;
  355. }
  356. }
  357. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  358. return $data->getPlain();
  359. }
  360. return $data;
  361. }
  362. /**
  363. * Get highlights - Highlights
  364. * @return \Pimcore\Model\DataObject\Data\BlockElement[][]
  365. */
  366. public function getHighlights($language = null): ?array
  367. {
  368. $data = $this->getLocalizedfields()->getLocalizedValue("highlights", $language);
  369. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  370. $preValue = $this->preGetValue("highlights");
  371. if ($preValue !== null) {
  372. return $preValue;
  373. }
  374. }
  375. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  376. return $data->getPlain();
  377. }
  378. return $data;
  379. }
  380. /**
  381. * Get brandCountry - brandCountry
  382. * @return string|null
  383. */
  384. public function getBrandCountry($language = null): ?string
  385. {
  386. $data = $this->getLocalizedfields()->getLocalizedValue("brandCountry", $language);
  387. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  388. $preValue = $this->preGetValue("brandCountry");
  389. if ($preValue !== null) {
  390. return $preValue;
  391. }
  392. }
  393. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  394. return $data->getPlain();
  395. }
  396. return $data;
  397. }
  398. /**
  399. * Get manufacturerCountry - manufacturerCountry
  400. * @return string|null
  401. */
  402. public function getManufacturerCountry($language = null): ?string
  403. {
  404. $data = $this->getLocalizedfields()->getLocalizedValue("manufacturerCountry", $language);
  405. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  406. $preValue = $this->preGetValue("manufacturerCountry");
  407. if ($preValue !== null) {
  408. return $preValue;
  409. }
  410. }
  411. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  412. return $data->getPlain();
  413. }
  414. return $data;
  415. }
  416. /**
  417. * Get material - material
  418. * @return string|null
  419. */
  420. public function getMaterial($language = null): ?string
  421. {
  422. $data = $this->getLocalizedfields()->getLocalizedValue("material", $language);
  423. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  424. $preValue = $this->preGetValue("material");
  425. if ($preValue !== null) {
  426. return $preValue;
  427. }
  428. }
  429. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  430. return $data->getPlain();
  431. }
  432. return $data;
  433. }
  434. /**
  435. * Get complectation - complectation
  436. * @return string|null
  437. */
  438. public function getComplectation($language = null): ?string
  439. {
  440. $data = $this->getLocalizedfields()->getLocalizedValue("complectation", $language);
  441. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  442. $preValue = $this->preGetValue("complectation");
  443. if ($preValue !== null) {
  444. return $preValue;
  445. }
  446. }
  447. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  448. return $data->getPlain();
  449. }
  450. return $data;
  451. }
  452. /**
  453. * Get colour - colour
  454. * @return string|null
  455. */
  456. public function getColour($language = null): ?string
  457. {
  458. $data = $this->getLocalizedfields()->getLocalizedValue("colour", $language);
  459. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  460. $preValue = $this->preGetValue("colour");
  461. if ($preValue !== null) {
  462. return $preValue;
  463. }
  464. }
  465. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  466. return $data->getPlain();
  467. }
  468. return $data;
  469. }
  470. /**
  471. * Get style - style
  472. * @return string|null
  473. */
  474. public function getStyle($language = null): ?string
  475. {
  476. $data = $this->getLocalizedfields()->getLocalizedValue("style", $language);
  477. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  478. $preValue = $this->preGetValue("style");
  479. if ($preValue !== null) {
  480. return $preValue;
  481. }
  482. }
  483. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  484. return $data->getPlain();
  485. }
  486. return $data;
  487. }
  488. /**
  489. * Get stickers - stickers
  490. * @return \Pimcore\Model\DataObject\Data\ImageGallery|null
  491. */
  492. public function getStickers($language = null): ?\Pimcore\Model\DataObject\Data\ImageGallery
  493. {
  494. $data = $this->getLocalizedfields()->getLocalizedValue("stickers", $language);
  495. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  496. $preValue = $this->preGetValue("stickers");
  497. if ($preValue !== null) {
  498. return $preValue;
  499. }
  500. }
  501. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  502. return $data->getPlain();
  503. }
  504. return $data;
  505. }
  506. /**
  507. * Get wasteSetIncluded - Waste set included
  508. * @return string|null
  509. */
  510. public function getWasteSetIncluded($language = null): ?string
  511. {
  512. $data = $this->getLocalizedfields()->getLocalizedValue("wasteSetIncluded", $language);
  513. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  514. $preValue = $this->preGetValue("wasteSetIncluded");
  515. if ($preValue !== null) {
  516. return $preValue;
  517. }
  518. }
  519. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  520. return $data->getPlain();
  521. }
  522. return $data;
  523. }
  524. /**
  525. * Get thermostatic - Thermostatic
  526. * @return string|null
  527. */
  528. public function getThermostatic($language = null): ?string
  529. {
  530. $data = $this->getLocalizedfields()->getLocalizedValue("thermostatic", $language);
  531. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  532. $preValue = $this->preGetValue("thermostatic");
  533. if ($preValue !== null) {
  534. return $preValue;
  535. }
  536. }
  537. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  538. return $data->getPlain();
  539. }
  540. return $data;
  541. }
  542. /**
  543. * Get concealedInstallation - Concealed installation
  544. * @return string|null
  545. */
  546. public function getConcealedInstallation($language = null): ?string
  547. {
  548. $data = $this->getLocalizedfields()->getLocalizedValue("concealedInstallation", $language);
  549. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  550. $preValue = $this->preGetValue("concealedInstallation");
  551. if ($preValue !== null) {
  552. return $preValue;
  553. }
  554. }
  555. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  556. return $data->getPlain();
  557. }
  558. return $data;
  559. }
  560. /**
  561. * Get mixerType - Mixer type
  562. * @return string|null
  563. */
  564. public function getMixerType($language = null): ?string
  565. {
  566. $data = $this->getLocalizedfields()->getLocalizedValue("mixerType", $language);
  567. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  568. $preValue = $this->preGetValue("mixerType");
  569. if ($preValue !== null) {
  570. return $preValue;
  571. }
  572. }
  573. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  574. return $data->getPlain();
  575. }
  576. return $data;
  577. }
  578. /**
  579. * Set localizedfields -
  580. * @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
  581. * @return \Pimcore\Model\DataObject\Product
  582. */
  583. public function setLocalizedfields(?\Pimcore\Model\DataObject\Localizedfield $localizedfields)
  584. {
  585. $hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  586. \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  587. $currentData = $this->getLocalizedfields();
  588. \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  589. $this->markFieldDirty("localizedfields", true);
  590. $this->localizedfields = $localizedfields;
  591. return $this;
  592. }
  593. /**
  594. * Set name - name
  595. * @param string|null $name
  596. * @return \Pimcore\Model\DataObject\Product
  597. */
  598. public function setName (?string $name, $language = null)
  599. {
  600. $isEqual = false;
  601. $this->getLocalizedfields()->setLocalizedValue("name", $name, $language, !$isEqual);
  602. return $this;
  603. }
  604. /**
  605. * Set price - price
  606. * @param float|null $price
  607. * @return \Pimcore\Model\DataObject\Product
  608. */
  609. public function setPrice (?float $price, $language = null)
  610. {
  611. $isEqual = false;
  612. $this->getLocalizedfields()->setLocalizedValue("price", $price, $language, !$isEqual);
  613. return $this;
  614. }
  615. /**
  616. * Set isAviable - Is aviable
  617. * @param bool|null $isAviable
  618. * @return \Pimcore\Model\DataObject\Product
  619. */
  620. public function setIsAviable (?bool $isAviable, $language = null)
  621. {
  622. $isEqual = false;
  623. $this->getLocalizedfields()->setLocalizedValue("isAviable", $isAviable, $language, !$isEqual);
  624. return $this;
  625. }
  626. /**
  627. * Set video - video
  628. * @param \Pimcore\Model\DataObject\Data\Video|null $video
  629. * @return \Pimcore\Model\DataObject\Product
  630. */
  631. public function setVideo (?\Pimcore\Model\DataObject\Data\Video $video, $language = null)
  632. {
  633. $isEqual = false;
  634. $this->getLocalizedfields()->setLocalizedValue("video", $video, $language, !$isEqual);
  635. return $this;
  636. }
  637. /**
  638. * Set description - description
  639. * @param string|null $description
  640. * @return \Pimcore\Model\DataObject\Product
  641. */
  642. public function setDescription (?string $description, $language = null)
  643. {
  644. $isEqual = false;
  645. $this->getLocalizedfields()->setLocalizedValue("description", $description, $language, !$isEqual);
  646. return $this;
  647. }
  648. /**
  649. * Set gallery - gallery
  650. * @param \Pimcore\Model\DataObject\Data\ImageGallery|null $gallery
  651. * @return \Pimcore\Model\DataObject\Product
  652. */
  653. public function setGallery (?\Pimcore\Model\DataObject\Data\ImageGallery $gallery, $language = null)
  654. {
  655. $isEqual = false;
  656. $this->getLocalizedfields()->setLocalizedValue("gallery", $gallery, $language, !$isEqual);
  657. return $this;
  658. }
  659. /**
  660. * Set highlights - Highlights
  661. * @param \Pimcore\Model\DataObject\Data\BlockElement[][] $highlights
  662. * @return \Pimcore\Model\DataObject\Product
  663. */
  664. public function setHighlights (?array $highlights, $language = null)
  665. {
  666. $isEqual = false;
  667. $this->getLocalizedfields()->setLocalizedValue("highlights", $highlights, $language, !$isEqual);
  668. return $this;
  669. }
  670. /**
  671. * Set brandCountry - brandCountry
  672. * @param string|null $brandCountry
  673. * @return \Pimcore\Model\DataObject\Product
  674. */
  675. public function setBrandCountry (?string $brandCountry, $language = null)
  676. {
  677. $isEqual = false;
  678. $this->getLocalizedfields()->setLocalizedValue("brandCountry", $brandCountry, $language, !$isEqual);
  679. return $this;
  680. }
  681. /**
  682. * Set manufacturerCountry - manufacturerCountry
  683. * @param string|null $manufacturerCountry
  684. * @return \Pimcore\Model\DataObject\Product
  685. */
  686. public function setManufacturerCountry (?string $manufacturerCountry, $language = null)
  687. {
  688. $isEqual = false;
  689. $this->getLocalizedfields()->setLocalizedValue("manufacturerCountry", $manufacturerCountry, $language, !$isEqual);
  690. return $this;
  691. }
  692. /**
  693. * Set material - material
  694. * @param string|null $material
  695. * @return \Pimcore\Model\DataObject\Product
  696. */
  697. public function setMaterial (?string $material, $language = null)
  698. {
  699. $isEqual = false;
  700. $this->getLocalizedfields()->setLocalizedValue("material", $material, $language, !$isEqual);
  701. return $this;
  702. }
  703. /**
  704. * Set complectation - complectation
  705. * @param string|null $complectation
  706. * @return \Pimcore\Model\DataObject\Product
  707. */
  708. public function setComplectation (?string $complectation, $language = null)
  709. {
  710. $isEqual = false;
  711. $this->getLocalizedfields()->setLocalizedValue("complectation", $complectation, $language, !$isEqual);
  712. return $this;
  713. }
  714. /**
  715. * Set colour - colour
  716. * @param string|null $colour
  717. * @return \Pimcore\Model\DataObject\Product
  718. */
  719. public function setColour (?string $colour, $language = null)
  720. {
  721. $isEqual = false;
  722. $this->getLocalizedfields()->setLocalizedValue("colour", $colour, $language, !$isEqual);
  723. return $this;
  724. }
  725. /**
  726. * Set style - style
  727. * @param string|null $style
  728. * @return \Pimcore\Model\DataObject\Product
  729. */
  730. public function setStyle (?string $style, $language = null)
  731. {
  732. $isEqual = false;
  733. $this->getLocalizedfields()->setLocalizedValue("style", $style, $language, !$isEqual);
  734. return $this;
  735. }
  736. /**
  737. * Set stickers - stickers
  738. * @param \Pimcore\Model\DataObject\Data\ImageGallery|null $stickers
  739. * @return \Pimcore\Model\DataObject\Product
  740. */
  741. public function setStickers (?\Pimcore\Model\DataObject\Data\ImageGallery $stickers, $language = null)
  742. {
  743. $isEqual = false;
  744. $this->getLocalizedfields()->setLocalizedValue("stickers", $stickers, $language, !$isEqual);
  745. return $this;
  746. }
  747. /**
  748. * Set wasteSetIncluded - Waste set included
  749. * @param string|null $wasteSetIncluded
  750. * @return \Pimcore\Model\DataObject\Product
  751. */
  752. public function setWasteSetIncluded (?string $wasteSetIncluded, $language = null)
  753. {
  754. $isEqual = false;
  755. $this->getLocalizedfields()->setLocalizedValue("wasteSetIncluded", $wasteSetIncluded, $language, !$isEqual);
  756. return $this;
  757. }
  758. /**
  759. * Set thermostatic - Thermostatic
  760. * @param string|null $thermostatic
  761. * @return \Pimcore\Model\DataObject\Product
  762. */
  763. public function setThermostatic (?string $thermostatic, $language = null)
  764. {
  765. $isEqual = false;
  766. $this->getLocalizedfields()->setLocalizedValue("thermostatic", $thermostatic, $language, !$isEqual);
  767. return $this;
  768. }
  769. /**
  770. * Set concealedInstallation - Concealed installation
  771. * @param string|null $concealedInstallation
  772. * @return \Pimcore\Model\DataObject\Product
  773. */
  774. public function setConcealedInstallation (?string $concealedInstallation, $language = null)
  775. {
  776. $isEqual = false;
  777. $this->getLocalizedfields()->setLocalizedValue("concealedInstallation", $concealedInstallation, $language, !$isEqual);
  778. return $this;
  779. }
  780. /**
  781. * Set mixerType - Mixer type
  782. * @param string|null $mixerType
  783. * @return \Pimcore\Model\DataObject\Product
  784. */
  785. public function setMixerType (?string $mixerType, $language = null)
  786. {
  787. $isEqual = false;
  788. $this->getLocalizedfields()->setLocalizedValue("mixerType", $mixerType, $language, !$isEqual);
  789. return $this;
  790. }
  791. /**
  792. * Get brand - Brand
  793. * @return \Pimcore\Model\DataObject\Brand|null
  794. */
  795. public function getBrand(): ?\Pimcore\Model\Element\AbstractElement
  796. {
  797. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  798. $preValue = $this->preGetValue("brand");
  799. if ($preValue !== null) {
  800. return $preValue;
  801. }
  802. }
  803. $data = $this->getClass()->getFieldDefinition("brand")->preGetData($this);
  804. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  805. return $data->getPlain();
  806. }
  807. return $data;
  808. }
  809. /**
  810. * Set brand - Brand
  811. * @param \Pimcore\Model\DataObject\Brand $brand
  812. * @return \Pimcore\Model\DataObject\Product
  813. */
  814. public function setBrand(?\Pimcore\Model\Element\AbstractElement $brand)
  815. {
  816. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
  817. $fd = $this->getClass()->getFieldDefinition("brand");
  818. $hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  819. \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  820. $currentData = $this->getBrand();
  821. \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  822. $isEqual = $fd->isEqual($currentData, $brand);
  823. if (!$isEqual) {
  824. $this->markFieldDirty("brand", true);
  825. }
  826. $this->brand = $fd->preSetData($this, $brand);
  827. return $this;
  828. }
  829. /**
  830. * Get collection - Collection
  831. * @return \Pimcore\Model\DataObject\Collection|null
  832. */
  833. public function getCollection(): ?\Pimcore\Model\Element\AbstractElement
  834. {
  835. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  836. $preValue = $this->preGetValue("collection");
  837. if ($preValue !== null) {
  838. return $preValue;
  839. }
  840. }
  841. $data = $this->getClass()->getFieldDefinition("collection")->preGetData($this);
  842. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  843. return $data->getPlain();
  844. }
  845. return $data;
  846. }
  847. /**
  848. * Set collection - Collection
  849. * @param \Pimcore\Model\DataObject\Collection $collection
  850. * @return \Pimcore\Model\DataObject\Product
  851. */
  852. public function setCollection(?\Pimcore\Model\Element\AbstractElement $collection)
  853. {
  854. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
  855. $fd = $this->getClass()->getFieldDefinition("collection");
  856. $hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  857. \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  858. $currentData = $this->getCollection();
  859. \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  860. $isEqual = $fd->isEqual($currentData, $collection);
  861. if (!$isEqual) {
  862. $this->markFieldDirty("collection", true);
  863. }
  864. $this->collection = $fd->preSetData($this, $collection);
  865. return $this;
  866. }
  867. /**
  868. * Get productType - productType
  869. * @return \Pimcore\Model\DataObject\ProductType|null
  870. */
  871. public function getProductType(): ?\Pimcore\Model\Element\AbstractElement
  872. {
  873. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  874. $preValue = $this->preGetValue("productType");
  875. if ($preValue !== null) {
  876. return $preValue;
  877. }
  878. }
  879. $data = $this->getClass()->getFieldDefinition("productType")->preGetData($this);
  880. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  881. return $data->getPlain();
  882. }
  883. return $data;
  884. }
  885. /**
  886. * Set productType - productType
  887. * @param \Pimcore\Model\DataObject\ProductType $productType
  888. * @return \Pimcore\Model\DataObject\Product
  889. */
  890. public function setProductType(?\Pimcore\Model\Element\AbstractElement $productType)
  891. {
  892. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
  893. $fd = $this->getClass()->getFieldDefinition("productType");
  894. $hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  895. \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  896. $currentData = $this->getProductType();
  897. \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  898. $isEqual = $fd->isEqual($currentData, $productType);
  899. if (!$isEqual) {
  900. $this->markFieldDirty("productType", true);
  901. }
  902. $this->productType = $fd->preSetData($this, $productType);
  903. return $this;
  904. }
  905. /**
  906. * Get barCode - barCode
  907. * @return string|null
  908. */
  909. public function getBarCode(): ?string
  910. {
  911. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  912. $preValue = $this->preGetValue("barCode");
  913. if ($preValue !== null) {
  914. return $preValue;
  915. }
  916. }
  917. $data = $this->barCode;
  918. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  919. return $data->getPlain();
  920. }
  921. return $data;
  922. }
  923. /**
  924. * Set barCode - barCode
  925. * @param string|null $barCode
  926. * @return \Pimcore\Model\DataObject\Product
  927. */
  928. public function setBarCode(?string $barCode)
  929. {
  930. $this->barCode = $barCode;
  931. return $this;
  932. }
  933. /**
  934. * Get releaseDate - releaseDate
  935. * @return \Carbon\Carbon|null
  936. */
  937. public function getReleaseDate(): ?\Carbon\Carbon
  938. {
  939. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  940. $preValue = $this->preGetValue("releaseDate");
  941. if ($preValue !== null) {
  942. return $preValue;
  943. }
  944. }
  945. $data = $this->releaseDate;
  946. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  947. return $data->getPlain();
  948. }
  949. return $data;
  950. }
  951. /**
  952. * Set releaseDate - releaseDate
  953. * @param \Carbon\Carbon|null $releaseDate
  954. * @return \Pimcore\Model\DataObject\Product
  955. */
  956. public function setReleaseDate(?\Carbon\Carbon $releaseDate)
  957. {
  958. $this->releaseDate = $releaseDate;
  959. return $this;
  960. }
  961. /**
  962. * Get previewOne - previewOne
  963. * @return \Pimcore\Model\Asset\Image|null
  964. */
  965. public function getPreviewOne(): ?\Pimcore\Model\Asset\Image
  966. {
  967. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  968. $preValue = $this->preGetValue("previewOne");
  969. if ($preValue !== null) {
  970. return $preValue;
  971. }
  972. }
  973. $data = $this->previewOne;
  974. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  975. return $data->getPlain();
  976. }
  977. return $data;
  978. }
  979. /**
  980. * Set previewOne - previewOne
  981. * @param \Pimcore\Model\Asset\Image|null $previewOne
  982. * @return \Pimcore\Model\DataObject\Product
  983. */
  984. public function setPreviewOne(?\Pimcore\Model\Asset\Image $previewOne)
  985. {
  986. $this->previewOne = $previewOne;
  987. return $this;
  988. }
  989. /**
  990. * Get previewTwo - previewTwo
  991. * @return \Pimcore\Model\Asset\Image|null
  992. */
  993. public function getPreviewTwo(): ?\Pimcore\Model\Asset\Image
  994. {
  995. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  996. $preValue = $this->preGetValue("previewTwo");
  997. if ($preValue !== null) {
  998. return $preValue;
  999. }
  1000. }
  1001. $data = $this->previewTwo;
  1002. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1003. return $data->getPlain();
  1004. }
  1005. return $data;
  1006. }
  1007. /**
  1008. * Set previewTwo - previewTwo
  1009. * @param \Pimcore\Model\Asset\Image|null $previewTwo
  1010. * @return \Pimcore\Model\DataObject\Product
  1011. */
  1012. public function setPreviewTwo(?\Pimcore\Model\Asset\Image $previewTwo)
  1013. {
  1014. $this->previewTwo = $previewTwo;
  1015. return $this;
  1016. }
  1017. /**
  1018. * Get internationalGallery - International gallery
  1019. * @return \Pimcore\Model\DataObject\Data\ImageGallery|null
  1020. */
  1021. public function getInternationalGallery(): ?\Pimcore\Model\DataObject\Data\ImageGallery
  1022. {
  1023. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1024. $preValue = $this->preGetValue("internationalGallery");
  1025. if ($preValue !== null) {
  1026. return $preValue;
  1027. }
  1028. }
  1029. $data = $this->internationalGallery;
  1030. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1031. return $data->getPlain();
  1032. }
  1033. return $data;
  1034. }
  1035. /**
  1036. * Set internationalGallery - International gallery
  1037. * @param \Pimcore\Model\DataObject\Data\ImageGallery|null $internationalGallery
  1038. * @return \Pimcore\Model\DataObject\Product
  1039. */
  1040. public function setInternationalGallery(?\Pimcore\Model\DataObject\Data\ImageGallery $internationalGallery)
  1041. {
  1042. $this->internationalGallery = $internationalGallery;
  1043. return $this;
  1044. }
  1045. /**
  1046. * Get warranty - warranty
  1047. * @return float|null
  1048. */
  1049. public function getWarranty(): ?float
  1050. {
  1051. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1052. $preValue = $this->preGetValue("warranty");
  1053. if ($preValue !== null) {
  1054. return $preValue;
  1055. }
  1056. }
  1057. $data = $this->warranty;
  1058. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1059. return $data->getPlain();
  1060. }
  1061. return $data;
  1062. }
  1063. /**
  1064. * Set warranty - warranty
  1065. * @param float|null $warranty
  1066. * @return \Pimcore\Model\DataObject\Product
  1067. */
  1068. public function setWarranty(?float $warranty)
  1069. {
  1070. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  1071. $fd = $this->getClass()->getFieldDefinition("warranty");
  1072. $this->warranty = $fd->preSetData($this, $warranty);
  1073. return $this;
  1074. }
  1075. /**
  1076. * Get depth - depth
  1077. * @return float|null
  1078. */
  1079. public function getDepth(): ?float
  1080. {
  1081. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1082. $preValue = $this->preGetValue("depth");
  1083. if ($preValue !== null) {
  1084. return $preValue;
  1085. }
  1086. }
  1087. $data = $this->depth;
  1088. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1089. return $data->getPlain();
  1090. }
  1091. return $data;
  1092. }
  1093. /**
  1094. * Set depth - depth
  1095. * @param float|null $depth
  1096. * @return \Pimcore\Model\DataObject\Product
  1097. */
  1098. public function setDepth(?float $depth)
  1099. {
  1100. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  1101. $fd = $this->getClass()->getFieldDefinition("depth");
  1102. $this->depth = $fd->preSetData($this, $depth);
  1103. return $this;
  1104. }
  1105. /**
  1106. * Get width - width
  1107. * @return float|null
  1108. */
  1109. public function getWidth(): ?float
  1110. {
  1111. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1112. $preValue = $this->preGetValue("width");
  1113. if ($preValue !== null) {
  1114. return $preValue;
  1115. }
  1116. }
  1117. $data = $this->width;
  1118. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1119. return $data->getPlain();
  1120. }
  1121. return $data;
  1122. }
  1123. /**
  1124. * Set width - width
  1125. * @param float|null $width
  1126. * @return \Pimcore\Model\DataObject\Product
  1127. */
  1128. public function setWidth(?float $width)
  1129. {
  1130. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  1131. $fd = $this->getClass()->getFieldDefinition("width");
  1132. $this->width = $fd->preSetData($this, $width);
  1133. return $this;
  1134. }
  1135. /**
  1136. * Get height - height
  1137. * @return float|null
  1138. */
  1139. public function getHeight(): ?float
  1140. {
  1141. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1142. $preValue = $this->preGetValue("height");
  1143. if ($preValue !== null) {
  1144. return $preValue;
  1145. }
  1146. }
  1147. $data = $this->height;
  1148. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1149. return $data->getPlain();
  1150. }
  1151. return $data;
  1152. }
  1153. /**
  1154. * Set height - height
  1155. * @param float|null $height
  1156. * @return \Pimcore\Model\DataObject\Product
  1157. */
  1158. public function setHeight(?float $height)
  1159. {
  1160. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  1161. $fd = $this->getClass()->getFieldDefinition("height");
  1162. $this->height = $fd->preSetData($this, $height);
  1163. return $this;
  1164. }
  1165. /**
  1166. * Get packageDepth - packageDepth
  1167. * @return float|null
  1168. */
  1169. public function getPackageDepth(): ?float
  1170. {
  1171. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1172. $preValue = $this->preGetValue("packageDepth");
  1173. if ($preValue !== null) {
  1174. return $preValue;
  1175. }
  1176. }
  1177. $data = $this->packageDepth;
  1178. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1179. return $data->getPlain();
  1180. }
  1181. return $data;
  1182. }
  1183. /**
  1184. * Set packageDepth - packageDepth
  1185. * @param float|null $packageDepth
  1186. * @return \Pimcore\Model\DataObject\Product
  1187. */
  1188. public function setPackageDepth(?float $packageDepth)
  1189. {
  1190. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  1191. $fd = $this->getClass()->getFieldDefinition("packageDepth");
  1192. $this->packageDepth = $fd->preSetData($this, $packageDepth);
  1193. return $this;
  1194. }
  1195. /**
  1196. * Get packageWidth - packageWidth
  1197. * @return float|null
  1198. */
  1199. public function getPackageWidth(): ?float
  1200. {
  1201. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1202. $preValue = $this->preGetValue("packageWidth");
  1203. if ($preValue !== null) {
  1204. return $preValue;
  1205. }
  1206. }
  1207. $data = $this->packageWidth;
  1208. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1209. return $data->getPlain();
  1210. }
  1211. return $data;
  1212. }
  1213. /**
  1214. * Set packageWidth - packageWidth
  1215. * @param float|null $packageWidth
  1216. * @return \Pimcore\Model\DataObject\Product
  1217. */
  1218. public function setPackageWidth(?float $packageWidth)
  1219. {
  1220. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  1221. $fd = $this->getClass()->getFieldDefinition("packageWidth");
  1222. $this->packageWidth = $fd->preSetData($this, $packageWidth);
  1223. return $this;
  1224. }
  1225. /**
  1226. * Get packageHeight - packageHeight
  1227. * @return float|null
  1228. */
  1229. public function getPackageHeight(): ?float
  1230. {
  1231. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1232. $preValue = $this->preGetValue("packageHeight");
  1233. if ($preValue !== null) {
  1234. return $preValue;
  1235. }
  1236. }
  1237. $data = $this->packageHeight;
  1238. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1239. return $data->getPlain();
  1240. }
  1241. return $data;
  1242. }
  1243. /**
  1244. * Set packageHeight - packageHeight
  1245. * @param float|null $packageHeight
  1246. * @return \Pimcore\Model\DataObject\Product
  1247. */
  1248. public function setPackageHeight(?float $packageHeight)
  1249. {
  1250. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  1251. $fd = $this->getClass()->getFieldDefinition("packageHeight");
  1252. $this->packageHeight = $fd->preSetData($this, $packageHeight);
  1253. return $this;
  1254. }
  1255. /**
  1256. * Get weight - weight
  1257. * @return float|null
  1258. */
  1259. public function getWeight(): ?float
  1260. {
  1261. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1262. $preValue = $this->preGetValue("weight");
  1263. if ($preValue !== null) {
  1264. return $preValue;
  1265. }
  1266. }
  1267. $data = $this->weight;
  1268. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1269. return $data->getPlain();
  1270. }
  1271. return $data;
  1272. }
  1273. /**
  1274. * Set weight - weight
  1275. * @param float|null $weight
  1276. * @return \Pimcore\Model\DataObject\Product
  1277. */
  1278. public function setWeight(?float $weight)
  1279. {
  1280. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  1281. $fd = $this->getClass()->getFieldDefinition("weight");
  1282. $this->weight = $fd->preSetData($this, $weight);
  1283. return $this;
  1284. }
  1285. /**
  1286. * Get categoryParameters - categoryParameters
  1287. * @return \Pimcore\Model\DataObject\Classificationstore|null
  1288. */
  1289. public function getCategoryParameters(): ?\Pimcore\Model\DataObject\Classificationstore
  1290. {
  1291. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1292. $preValue = $this->preGetValue("categoryParameters");
  1293. if ($preValue !== null) {
  1294. return $preValue;
  1295. }
  1296. }
  1297. $data = $this->getClass()->getFieldDefinition("categoryParameters")->preGetData($this);
  1298. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1299. return $data->getPlain();
  1300. }
  1301. return $data;
  1302. }
  1303. /**
  1304. * Set categoryParameters - categoryParameters
  1305. * @param \Pimcore\Model\DataObject\Classificationstore|null $categoryParameters
  1306. * @return \Pimcore\Model\DataObject\Product
  1307. */
  1308. public function setCategoryParameters(?\Pimcore\Model\DataObject\Classificationstore $categoryParameters)
  1309. {
  1310. $this->categoryParameters = $categoryParameters;
  1311. return $this;
  1312. }
  1313. /**
  1314. * Get categoryProperties - categoryProperties
  1315. * @return \Pimcore\Model\DataObject\Classificationstore|null
  1316. */
  1317. public function getCategoryProperties(): ?\Pimcore\Model\DataObject\Classificationstore
  1318. {
  1319. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1320. $preValue = $this->preGetValue("categoryProperties");
  1321. if ($preValue !== null) {
  1322. return $preValue;
  1323. }
  1324. }
  1325. $data = $this->getClass()->getFieldDefinition("categoryProperties")->preGetData($this);
  1326. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1327. return $data->getPlain();
  1328. }
  1329. return $data;
  1330. }
  1331. /**
  1332. * Set categoryProperties - categoryProperties
  1333. * @param \Pimcore\Model\DataObject\Classificationstore|null $categoryProperties
  1334. * @return \Pimcore\Model\DataObject\Product
  1335. */
  1336. public function setCategoryProperties(?\Pimcore\Model\DataObject\Classificationstore $categoryProperties)
  1337. {
  1338. $this->categoryProperties = $categoryProperties;
  1339. return $this;
  1340. }
  1341. /**
  1342. * Get categories - categories
  1343. * @return \Pimcore\Model\DataObject\Category[]
  1344. */
  1345. public function getCategories(): array
  1346. {
  1347. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1348. $preValue = $this->preGetValue("categories");
  1349. if ($preValue !== null) {
  1350. return $preValue;
  1351. }
  1352. }
  1353. $data = $this->getClass()->getFieldDefinition("categories")->preGetData($this);
  1354. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1355. return $data->getPlain();
  1356. }
  1357. return $data;
  1358. }
  1359. /**
  1360. * Set categories - categories
  1361. * @param \Pimcore\Model\DataObject\Category[] $categories
  1362. * @return \Pimcore\Model\DataObject\Product
  1363. */
  1364. public function setCategories(?array $categories)
  1365. {
  1366. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  1367. $fd = $this->getClass()->getFieldDefinition("categories");
  1368. $hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  1369. \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  1370. $currentData = $this->getCategories();
  1371. \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  1372. $isEqual = $fd->isEqual($currentData, $categories);
  1373. if (!$isEqual) {
  1374. $this->markFieldDirty("categories", true);
  1375. }
  1376. $this->categories = $fd->preSetData($this, $categories);
  1377. return $this;
  1378. }
  1379. /**
  1380. * Get awards - Awards
  1381. * @return \Pimcore\Model\DataObject\Award[]
  1382. */
  1383. public function getAwards(): array
  1384. {
  1385. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1386. $preValue = $this->preGetValue("awards");
  1387. if ($preValue !== null) {
  1388. return $preValue;
  1389. }
  1390. }
  1391. $data = $this->getClass()->getFieldDefinition("awards")->preGetData($this);
  1392. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1393. return $data->getPlain();
  1394. }
  1395. return $data;
  1396. }
  1397. /**
  1398. * Set awards - Awards
  1399. * @param \Pimcore\Model\DataObject\Award[] $awards
  1400. * @return \Pimcore\Model\DataObject\Product
  1401. */
  1402. public function setAwards(?array $awards)
  1403. {
  1404. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  1405. $fd = $this->getClass()->getFieldDefinition("awards");
  1406. $hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  1407. \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  1408. $currentData = $this->getAwards();
  1409. \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  1410. $isEqual = $fd->isEqual($currentData, $awards);
  1411. if (!$isEqual) {
  1412. $this->markFieldDirty("awards", true);
  1413. }
  1414. $this->awards = $fd->preSetData($this, $awards);
  1415. return $this;
  1416. }
  1417. /**
  1418. * Get manuals - manuals
  1419. * @return \Pimcore\Model\Asset[]
  1420. */
  1421. public function getManuals(): array
  1422. {
  1423. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1424. $preValue = $this->preGetValue("manuals");
  1425. if ($preValue !== null) {
  1426. return $preValue;
  1427. }
  1428. }
  1429. $data = $this->getClass()->getFieldDefinition("manuals")->preGetData($this);
  1430. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1431. return $data->getPlain();
  1432. }
  1433. return $data;
  1434. }
  1435. /**
  1436. * Set manuals - manuals
  1437. * @param \Pimcore\Model\Asset[] $manuals
  1438. * @return \Pimcore\Model\DataObject\Product
  1439. */
  1440. public function setManuals(?array $manuals)
  1441. {
  1442. /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyRelation $fd */
  1443. $fd = $this->getClass()->getFieldDefinition("manuals");
  1444. $hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  1445. \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  1446. $currentData = $this->getManuals();
  1447. \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  1448. $isEqual = $fd->isEqual($currentData, $manuals);
  1449. if (!$isEqual) {
  1450. $this->markFieldDirty("manuals", true);
  1451. }
  1452. $this->manuals = $fd->preSetData($this, $manuals);
  1453. return $this;
  1454. }
  1455. /**
  1456. * Get schemes - Schemes
  1457. * @return \Pimcore\Model\DataObject\Data\ImageGallery|null
  1458. */
  1459. public function getSchemes(): ?\Pimcore\Model\DataObject\Data\ImageGallery
  1460. {
  1461. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1462. $preValue = $this->preGetValue("schemes");
  1463. if ($preValue !== null) {
  1464. return $preValue;
  1465. }
  1466. }
  1467. $data = $this->schemes;
  1468. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1469. return $data->getPlain();
  1470. }
  1471. return $data;
  1472. }
  1473. /**
  1474. * Set schemes - Schemes
  1475. * @param \Pimcore\Model\DataObject\Data\ImageGallery|null $schemes
  1476. * @return \Pimcore\Model\DataObject\Product
  1477. */
  1478. public function setSchemes(?\Pimcore\Model\DataObject\Data\ImageGallery $schemes)
  1479. {
  1480. $this->schemes = $schemes;
  1481. return $this;
  1482. }
  1483. /**
  1484. * Get scheme - Scheme
  1485. * @return \Pimcore\Model\Asset\Image|null
  1486. */
  1487. public function getScheme(): ?\Pimcore\Model\Asset\Image
  1488. {
  1489. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  1490. $preValue = $this->preGetValue("scheme");
  1491. if ($preValue !== null) {
  1492. return $preValue;
  1493. }
  1494. }
  1495. $data = $this->scheme;
  1496. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  1497. return $data->getPlain();
  1498. }
  1499. return $data;
  1500. }
  1501. /**
  1502. * Set scheme - Scheme
  1503. * @param \Pimcore\Model\Asset\Image|null $scheme
  1504. * @return \Pimcore\Model\DataObject\Product
  1505. */
  1506. public function setScheme(?\Pimcore\Model\Asset\Image $scheme)
  1507. {
  1508. $this->scheme = $scheme;
  1509. return $this;
  1510. }
  1511. }