Added:
- toolbar refactor
This commit is contained in:
37
src/Manager/Toolbar/Element/AbstractToolbarElement.php
Normal file
37
src/Manager/Toolbar/Element/AbstractToolbarElement.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Manager\Toolbar\Element;
|
||||
|
||||
abstract class AbstractToolbarElement implements ToolbarElement
|
||||
{
|
||||
protected string $icon;
|
||||
protected string|array $text;
|
||||
protected string $action;
|
||||
|
||||
public function __construct(string $icon, string|array $text, string $action)
|
||||
{
|
||||
$this->icon = $icon;
|
||||
$this->text = $text;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
public function getIcon(): string
|
||||
{
|
||||
return $this->icon;
|
||||
}
|
||||
|
||||
public function getText(): string|array
|
||||
{
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
public function getAction(): string
|
||||
{
|
||||
return $this->action;
|
||||
}
|
||||
|
||||
public function getAdditionalProperties(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user