- toolbar refactor
This commit is contained in:
2024-06-29 18:13:43 +02:00
parent 858a5bed06
commit b4f0811bca
20 changed files with 432 additions and 193 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Manager\Toolbar\Definition;
use App\Manager\Toolbar\Element\ToolbarElement;
class Toolbar
{
private array $leftGroup = [];
private array $rightGroup = [];
public function addToLeftGroup(ToolbarElement $element): self
{
$this->leftGroup[] = $element;
return $this;
}
public function addToRightGroup(ToolbarElement $element): self
{
$this->rightGroup[] = $element;
return $this;
}
public function getGroups(): array
{
return [
'leftGroup' => $this->leftGroup,
'rightGroup' => $this->rightGroup,
];
}
}