Init lodner set builder plugin.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace LodnerSetBuilder\Storefront\Controller;
|
||||
|
||||
use Shopware\Core\PlatformRequest;
|
||||
use Shopware\Core\System\SalesChannel\SalesChannelContext;
|
||||
use Shopware\Storefront\Controller\StorefrontController;
|
||||
use Shopware\Storefront\Framework\Routing\StorefrontRouteScope;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
#[Route(defaults: [PlatformRequest::ATTRIBUTE_ROUTE_SCOPE => [StorefrontRouteScope::ID]])]
|
||||
class ExampleController extends StorefrontController
|
||||
{
|
||||
#[Route(
|
||||
path: '/example',
|
||||
name: 'frontend.example.example',
|
||||
methods: ['GET']
|
||||
)]
|
||||
public function showExample(Request $request, SalesChannelContext $context): Response
|
||||
{
|
||||
return $this->renderStorefront('@LodnerSetBuilder/storefront/page/example.html.twig', [
|
||||
'example' => 'Hello world'
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user