Skip to content
Code-Schnipsel Gruppen Projekte
Commit 1ac2b784 erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

feat: uuid and parent product set uuid for Article

Übergeordneter 15693081
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
3 Merge Requests!59fix: wrong net status at b2b shops,!58fix: wrong net status at b2b shops,!57feat: uuid and parent product set uuid for Article
Pipeline-Nr. 5767 bestanden
......@@ -145,6 +145,8 @@ public function __construct($attributes = [])
{
$defaults = [
'id',
'uuid',
'productSetParentUuid',
'articleNo',
'gtin',
'title',
......@@ -252,6 +254,26 @@ public function getId()
return 0;
}
/**
* Return the Article UUID
*
* @return string|null
*/
public function getUuid(): ?string
{
return !empty($this->attributes['uuid']) ? $this->attributes['uuid'] : null;
}
/**
* Return the UUID of a parent article, if this article is part of a product set.
*
* @return string|null
*/
public function getProductSetParentUuid(): ?string
{
return !empty($this->attributes['productSetParentUuid']) ? $this->attributes['productSetParentUuid'] : null;
}
/**
* Return the Article Number
*
......@@ -699,6 +721,8 @@ public function toArray(): array
return [
// article data
'id' => $this->getId(),
'uuid' => $this->getUuid(),
'productSetParentUuid' => $this->getProductSetParentUuid(),
'title' => $this->getTitle(),
'articleNo' => $this->getArticleNo(),
'gtin' => $this->getGTIN(),
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren