Skip to content

Commit

Permalink
Fix Manufacturer Mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
hmennen90 committed Nov 13, 2024
1 parent 0b233ae commit c6dfb51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

class MakairaManufacturer extends MakairaEntity
{
private string $title;

private string $metaTitle;

private string $metaDescription;
Expand All @@ -29,6 +31,7 @@ public function toArray(): array
...parent::toArray(),

/* Manufacturer fields */
'title' => $this->title,
'metaTitle' => $this->metaTitle,
'metaDescription' => $this->metaDescription,
'metaKeywords' => $this->metaKeywords,
Expand All @@ -40,6 +43,14 @@ public function toArray(): array
];
}

public function setTitle(string $title): static
{
$this->title = $title;
return $this;
}



public function getMetaTitle(): string
{
return $this->metaTitle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function mapManufacturer(array $data): MakairaManufacturer
$transfer
->setType(MakairaEntity::DOC_TYPE_MANUFACTURER)
->setId($data['manufacturers_id'])
->setManufacturerTitle($data['manufacturers_name'])
->setTitle($data['manufacturers_name'])
->setPictureUrlMain($data['manufacturers_image'])
->setCreatedAt($createdAt)
->setUpdatedAt($updatedAt)
Expand Down

0 comments on commit c6dfb51

Please sign in to comment.