lagdo /
ui-builder
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Lagdo\UiBuilder\Builder; |
||
| 4 | |||
| 5 | use Lagdo\UiBuilder\Component\Base; |
||
| 6 | |||
| 7 | trait PanelBuilderTrait |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected string $panelComponentClass = ''; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected string $panelHeaderComponentClass = ''; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected string $panelBodyComponentClass = ''; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | protected string $panelFooterComponentClass = ''; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @inheritDoc |
||
| 31 | */ |
||
| 32 | public function panel(...$arguments): Base\PanelComponent |
||
| 33 | { |
||
| 34 | return $this->createComponentOfClass($this->panelComponentClass, $arguments); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @inheritDoc |
||
| 39 | */ |
||
| 40 | public function panelHeader(...$arguments): Base\PanelHeaderComponent |
||
| 41 | { |
||
| 42 | return $this->createComponentOfClass($this->panelHeaderComponentClass, $arguments); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @inheritDoc |
||
| 47 | */ |
||
| 48 | public function panelBody(...$arguments): Base\PanelBodyComponent |
||
| 49 | { |
||
| 50 | return $this->createComponentOfClass($this->panelBodyComponentClass, $arguments); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @inheritDoc |
||
| 55 | */ |
||
| 56 | public function panelFooter(...$arguments): Base\PanelFooterComponent |
||
| 57 | { |
||
| 58 | return $this->createComponentOfClass($this->panelFooterComponentClass, $arguments); |
||
| 59 | } |
||
| 60 | } |
||
| 61 |