add order property

This commit is contained in:
Simon Vieille 2024-05-13 13:57:34 +02:00
parent 51acd82432
commit bf6777054f
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -14,6 +14,7 @@ abstract class BuilderBlock
protected string $template = '';
protected bool $isContainer = false;
protected ?string $icon = null;
protected int $order = 1;
abstract public function configure();
@ -109,7 +110,7 @@ abstract class BuilderBlock
];
foreach ($extraOptions as $key => $value) {
if (in_array($key, array_keys($this->settings[$name]))) {
if (!in_array($key, array_keys($this->settings[$name]))) {
$this->settings[$name][$key] = $value;
}
}
@ -171,6 +172,18 @@ abstract class BuilderBlock
return $this->icon;
}
public function setOrder(int $order): self
{
$this->order = $order;
return $this;
}
public function getOrder(): int
{
return $this->order;
}
public function buildVars(array $data)
{
}