Skip to content

Commit

Permalink
fix builder set parent
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Oct 9, 2024
1 parent 357f75e commit 6d29f0d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@ public function setDescription(string $description): Builder
return $this;
}

public function setParent(string $parent): Builder
public function setParent(string $parent, ?array $template = null): Builder
{
$this->type->setParent($parent);
$parentType = PropertyTypeFactory::getReference($parent);
if (!empty($template)) {
$parentType->setTemplate($template);
}

$this->type->setParent($parentType);

return $this;
}
Expand Down

0 comments on commit 6d29f0d

Please sign in to comment.