Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| BuildersHubWebController | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| actionIndex | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Core\ModuleBuilder\Presentation\Web; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | use App\Core\Engine\Domain\Model\PermissionContext; |
| 12 | use Nyholm\Psr7\Factory\Psr17Factory; |
| 13 | use Psr\Http\Message\ResponseInterface; |
| 14 | use Twig\Environment as TwigEnvironment; |
| 15 | |
| 16 | /** |
| 17 | * Web Controller rendering the interactive Builders Hub dashboard. |
| 18 | * |
| 19 | * Provides a unified overview and launchpad for all visual wizards and builders: |
| 20 | * Module & Field Builder, Email Template Builder, and PDF Template Builder. |
| 21 | * |
| 22 | * @package App\Core\ModuleBuilder\Presentation\Web |
| 23 | */ |
| 24 | final readonly class BuildersHubWebController |
| 25 | { |
| 26 | |
| 27 | /** |
| 28 | * BuildersHubWebController constructor. |
| 29 | * |
| 30 | * @param Psr17Factory $psr17 PSR-17 response factory. |
| 31 | */ |
| 32 | public function __construct( |
| 33 | private Psr17Factory $psr17 |
| 34 | ) { |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Handles GET /system/builders request. |
| 39 | * |
| 40 | * @return ResponseInterface Rendered HTML response. |
| 41 | */ |
| 42 | public function actionIndex(): ResponseInterface |
| 43 | { |
| 44 | return $this->psr17->createResponse(302) |
| 45 | ->withHeader('Location', '/system/modules/builder/new'); |
| 46 | } |
| 47 | } |