This commit is contained in:
Thomas Peterson 2025-12-11 15:11:46 +01:00
parent 4be0f5a39d
commit beb6450338
231 changed files with 3094 additions and 2155 deletions

View File

@ -11,6 +11,6 @@ symfony-init: ## init Symfony
$(EXECUTE_IN_APPLICATION_CONTAINER) php "/application/src/new/bin/console" asset-map:compile; $(EXECUTE_IN_APPLICATION_CONTAINER) php "/application/src/new/bin/console" asset-map:compile;
$(EXECUTE_IN_APPLICATION_CONTAINER) php "/application/src/new/bin/console" assets:install; $(EXECUTE_IN_APPLICATION_CONTAINER) php "/application/src/new/bin/console" assets:install;
.PHONY: symfony .PHONY: php-stan
symfony: ## init Symfony php-stan: ## init Symfony
$(EXECUTE_IN_APPLICATION_CONTAINER) php "/application/src/new/bin/console" ; $(EXECUTE_IN_APPLICATION_CONTAINER) php "vendor/bin/phpstan" analyse ;

View File

@ -114,9 +114,8 @@
"maglnet/composer-require-checker": "4.*", "maglnet/composer-require-checker": "4.*",
"mockery/mockery": "^1.5", "mockery/mockery": "^1.5",
"php-parallel-lint/php-parallel-lint": "dev-develop", "php-parallel-lint/php-parallel-lint": "dev-develop",
"phpstan/phpstan": "^1", "phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^10", "phpunit/phpunit": "^10",
"rector/rector": "0.19.2",
"squizlabs/php_codesniffer": "*", "squizlabs/php_codesniffer": "*",
"symfony/browser-kit": "*", "symfony/browser-kit": "*",
"symfony/css-selector": "*", "symfony/css-selector": "*",

68
src/new/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "9bd3881eabd3d4f827c1febe6a7fe16d", "content-hash": "1f6b464ced8d089a56009a7fa15b2a34",
"packages": [ "packages": [
{ {
"name": "apimatic/core", "name": "apimatic/core",
@ -16334,15 +16334,15 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.12.32", "version": "2.1.33",
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9e800e6bee7d5bd02784d4c6069b48032d16224f",
"reference": "2770dcdf5078d0b0d53f94317e06affe88419aa8", "reference": "9e800e6bee7d5bd02784d4c6069b48032d16224f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2|^8.0" "php": "^7.4|^8.0"
}, },
"conflict": { "conflict": {
"phpstan/phpstan-shim": "*" "phpstan/phpstan-shim": "*"
@ -16383,7 +16383,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-09-30T10:16:31+00:00" "time": "2025-12-05T10:24:31+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
@ -16815,62 +16815,6 @@
], ],
"time": "2025-12-06T07:50:42+00:00" "time": "2025-12-06T07:50:42+00:00"
}, },
{
"name": "rector/rector",
"version": "0.19.2",
"source": {
"type": "git",
"url": "https://github.com/rectorphp/rector.git",
"reference": "bc96a99895bf47c6bfe70ea1b799f0081ed5a903"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rectorphp/rector/zipball/bc96a99895bf47c6bfe70ea1b799f0081ed5a903",
"reference": "bc96a99895bf47c6bfe70ea1b799f0081ed5a903",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0",
"phpstan/phpstan": "^1.10.56"
},
"conflict": {
"rector/rector-doctrine": "*",
"rector/rector-downgrade-php": "*",
"rector/rector-phpunit": "*",
"rector/rector-symfony": "*"
},
"bin": [
"bin/rector"
],
"type": "library",
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Instant Upgrade and Automated Refactoring of any PHP code",
"keywords": [
"automation",
"dev",
"migration",
"refactoring"
],
"support": {
"issues": "https://github.com/rectorphp/rector/issues",
"source": "https://github.com/rectorphp/rector/tree/0.19.2"
},
"funding": [
{
"url": "https://github.com/tomasvotruba",
"type": "github"
}
],
"time": "2024-01-19T10:58:30+00:00"
},
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",
"version": "2.0.1", "version": "2.0.1",

View File

@ -11,6 +11,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'url' => '%env(resolve:DATABASE_URL)%', 'url' => '%env(resolve:DATABASE_URL)%',
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'default_table_options' => ['collate' => 'utf8mb4_unicode_ci'], 'default_table_options' => ['collate' => 'utf8mb4_unicode_ci'],
'server_version' => '8.0',
], ],
'orm' => [ 'orm' => [
'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware', 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware',

View File

@ -1,7 +0,0 @@
<?php
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {};

6
src/new/phpstan.neon Normal file
View File

@ -0,0 +1,6 @@
parameters:
level: 7
paths:
- src
- var/plugins

View File

@ -20,11 +20,11 @@ use PSC\Shop\QueueBundle\Service\Queue\Manager;
use PSC\System\SettingsBundle\Service\Instance; use PSC\System\SettingsBundle\Service\Instance;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use PSC\System\UpdateBundle\Service\Migration; use PSC\System\UpdateBundle\Service\Migration;
use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Intl\NumberFormatter\NumberFormatter; use Symfony\Component\Intl\NumberFormatter\NumberFormatter;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\UX\Chartjs\Builder\ChartBuilderInterface; use Symfony\UX\Chartjs\Builder\ChartBuilderInterface;
use Symfony\UX\Chartjs\Model\Chart; use Symfony\UX\Chartjs\Model\Chart;
@ -47,24 +47,52 @@ class DashboardController extends AbstractController
* @return array|View|\Symfony\Component\HttpFoundation\RedirectResponse * @return array|View|\Symfony\Component\HttpFoundation\RedirectResponse
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
#[Route(path: '/dashboard', name: 'psc_backend_dashboard_index')] #[Route(path: '/dashboard', name: 'psc_backend_dashboard_index')]
#[Template] #[Template('@PSCBackendDashboard/dashboard/index.html.twig')]
public function indexAction(Migration $migration, Shop $shop, EntityManagerInterface $entityManager, Manager $queueService, Instance $instanceService, ChartBuilderInterface $chartBuilder, ContactRepository $contactRepository, Order $orderService) public function indexAction(
{ Migration $migration,
Shop $shop,
EntityManagerInterface $entityManager,
Manager $queueService,
Instance $instanceService,
ChartBuilderInterface $chartBuilder,
ContactRepository $contactRepository,
Order $orderService,
) {
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */ /** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
$selectedShop = $shop->getSelectedShop(); $selectedShop = $shop->getSelectedShop();
$year1 = date("Y"); $year1 = date('Y');
$year2 = date("Y") - 1; $year2 = date('Y') - 1;
$year3 = date("Y") - 2; $year3 = date('Y') - 2;
$tempSales1 = array_column($entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order')->getIncomeByShop($selectedShop->getUid(), $year1), 'brutto', 'monat'); $tempSales1 = array_column(
$tempSales2 = array_column($entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order')->getIncomeByShop($selectedShop->getUid(), $year2), 'brutto', 'monat'); $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order')->getIncomeByShop(
$tempSales3 = array_column($entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order')->getIncomeByShop($selectedShop->getUid(), $year3), 'brutto', 'monat'); $selectedShop->getUid(),
$year1,
),
'brutto',
'monat',
);
$tempSales2 = array_column(
$entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order')->getIncomeByShop(
$selectedShop->getUid(),
$year2,
),
'brutto',
'monat',
);
$tempSales3 = array_column(
$entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order')->getIncomeByShop(
$selectedShop->getUid(),
$year3,
),
'brutto',
'monat',
);
$fmt = new \NumberFormatter(locale_get_default(), \NumberFormatter::CURRENCY); $fmt = new \NumberFormatter(locale_get_default(), \NumberFormatter::CURRENCY);
$sales1 = array(); $sales1 = [];
$sales2 = array(); $sales2 = [];
$sales3 = array(); $sales3 = [];
for ($i = 1; $i <= 12; $i++) { for ($i = 1; $i <= 12; $i++) {
if (isset($tempSales1[$i])) { if (isset($tempSales1[$i])) {
$sales1[] = round($tempSales1[$i]); $sales1[] = round($tempSales1[$i]);
@ -84,7 +112,20 @@ class DashboardController extends AbstractController
} }
$chart = $chartBuilder->createChart(Chart::TYPE_LINE); $chart = $chartBuilder->createChart(Chart::TYPE_LINE);
$chart->setData([ $chart->setData([
'labels' => ['Januar', 'Februar', 'März', 'April', 'May', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], 'labels' => [
'Januar',
'Februar',
'März',
'April',
'May',
'Juni',
'Juli',
'August',
'September',
'Oktober',
'November',
'Dezember',
],
'datasets' => [ 'datasets' => [
[ [
'label' => $year1, 'label' => $year1,
@ -113,19 +154,18 @@ class DashboardController extends AbstractController
'maintainAspectRatio' => false, 'maintainAspectRatio' => false,
]); ]);
if ($migration->checkIfMigrationMustRun()) { if ($migration->checkIfMigrationMustRun()) {
return $this->redirectToRoute('psc_system_update_migration_do'); return $this->redirectToRoute('psc_system_update_migration_do');
} }
return array( return [
'user' => $this->getUser(), 'user' => $this->getUser(),
'shop' => $selectedShop, 'shop' => $selectedShop,
'lastContacts' => $contactRepository->getLastCreatedContacts($selectedShop, 10), 'lastContacts' => $contactRepository->getLastCreatedContacts($selectedShop, 10),
'lastOrders' => $orderService->getLastOrders(), 'lastOrders' => $orderService->getLastOrders(),
'queueErrorCount' => $queueService->getErrorJobCount(), 'queueErrorCount' => $queueService->getErrorJobCount(),
'instance' => $instanceService->getInstance(), 'instance' => $instanceService->getInstance(),
'chart' => $chart 'chart' => $chart,
); ];
} }
} }

View File

@ -16,8 +16,8 @@ namespace PSC\Backend\DashboardBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
/** /**
* DefaultController fürs ProductionBundle * DefaultController fürs ProductionBundle
@ -34,7 +34,7 @@ class DefaultController extends AbstractController
* @return View * @return View
*/ */
#[Route(path: '/', name: 'psc_backend_default_index')] #[Route(path: '/', name: 'psc_backend_default_index')]
#[Template] #[Template('@PSCBackendDashboard/default/index.html.twig')]
public function indexAction() public function indexAction()
{ {
return $this->redirect($this->generateUrl("psc_backend_dashboard_index")); return $this->redirect($this->generateUrl("psc_backend_dashboard_index"));

View File

@ -17,15 +17,15 @@ use Http\Message\Authentication;
use PSC\System\UpdateBundle\Service\Migration; use PSC\System\UpdateBundle\Service\Migration;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
class LoginController extends AbstractController class LoginController extends AbstractController
{ {
#[Route(path: '/login', name: 'psc_backend_login')] #[Route(path: '/login', name: 'psc_backend_login')]
#[Template] #[Template('@PSCBackendDashboard/login/index.html.twig')]
public function indexAction(Migration $migration, AuthenticationUtils $authenticationUtils) public function indexAction(Migration $migration, AuthenticationUtils $authenticationUtils)
{ {
if ($migration->checkIfMigrationMustRun()) { if ($migration->checkIfMigrationMustRun()) {

View File

@ -17,12 +17,12 @@ use Doctrine\ORM\EntityManagerInterface;
use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface; use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface;
use PSC\Shop\EntityBundle\Entity\Domain; use PSC\Shop\EntityBundle\Entity\Domain;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
/** /**
* ShopController fürs ProductionBundle * ShopController fürs ProductionBundle
@ -32,47 +32,62 @@ use Symfony\Component\Routing\Attribute\Route;
*/ */
class ShopController extends AbstractController class ShopController extends AbstractController
{ {
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
#[Template] #[Template('@PSCBackendDashboard/shop/my_editable_shops.html.twig')]
public function myEditableShopsAction(Request $request, Shop $shop, JWTTokenManagerInterface $jwtManager, EntityManagerInterface $entityManager) public function myEditableShopsAction(
{ Request $request,
Shop $shop,
JWTTokenManagerInterface $jwtManager,
EntityManagerInterface $entityManager,
) {
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */ /** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
$selectedShop = $shop->getSelectedShop(); $selectedShop = $shop->getSelectedShop();
$shops = $shop->getMyEditableShops(); $shops = $shop->getMyEditableShops();
$domains = $entityManager $domains = $entityManager->getRepository(Domain::class)->getAllByShopId($selectedShop);
->getRepository(Domain::class)->getAllByShopId($selectedShop);
if (count($domains) > 0) { if (count($domains) > 0) {
$domain = array_pop($domains)->getHost(); $domain = array_pop($domains)->getHost();
} else { } else {
$domain = false; $domain = false;
} }
return array('domain' => $domain, 'shops' => $shops, 'jwt' => $jwtManager->create($this->getUser()), 'selectedShop' => $selectedShop, 'displayDeletedShop' => $request->getSession()->get('displayDeletedShop', false)); return [
'domain' => $domain,
'shops' => $shops,
'jwt' => $jwtManager->create($this->getUser()),
'selectedShop' => $selectedShop,
'displayDeletedShop' => $request->getSession()->get('displayDeletedShop', false),
];
} }
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
#[Template] #[Template('@PSCBackendDashboard/shop/my_editable_shops_tailwind.html.twig')]
public function myEditableShopsTailwindAction(Request $request, Shop $shop, JWTTokenManagerInterface $jwtManager, EntityManagerInterface $entityManager) public function myEditableShopsTailwindAction(
{ Request $request,
Shop $shop,
JWTTokenManagerInterface $jwtManager,
EntityManagerInterface $entityManager,
) {
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */ /** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
$selectedShop = $shop->getSelectedShop(); $selectedShop = $shop->getSelectedShop();
$shops = $shop->getMyEditableShops(); $shops = $shop->getMyEditableShops();
$domains = $entityManager $domains = $entityManager->getRepository(Domain::class)->getAllByShopId($selectedShop);
->getRepository(Domain::class)->getAllByShopId($selectedShop);
if (count($domains) > 0) { if (count($domains) > 0) {
$domain = array_pop($domains)->getHost(); $domain = array_pop($domains)->getHost();
} else { } else {
$domain = false; $domain = false;
} }
return array('domain' => $domain, 'shops' => $shops, 'jwt' => $jwtManager->create($this->getUser()), 'selectedShop' => $selectedShop, 'displayDeletedShop' => $request->getSession()->get('displayDeletedShop', false)); return [
'domain' => $domain,
'shops' => $shops,
'jwt' => $jwtManager->create($this->getUser()),
'selectedShop' => $selectedShop,
'displayDeletedShop' => $request->getSession()->get('displayDeletedShop', false),
];
} }
/** /**
* Change Shop * Change Shop
* *
@ -83,13 +98,18 @@ class ShopController extends AbstractController
* @param $shop_uuid * @param $shop_uuid
* @return RedirectResponse * @return RedirectResponse
*/ */
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
#[Route(path: '/shop/change/{shop_uuid}', name: 'psc_backend_dashboard_shop_change')] #[Route(path: '/shop/change/{shop_uuid}', name: 'psc_backend_dashboard_shop_change')]
public function changeShopAction(Request $request, EntityManagerInterface $em, \Symfony\Component\Security\Core\Security $security, $shop_uuid) public function changeShopAction(
{ Request $request,
$em EntityManagerInterface $em,
->getRepository('PSC\Shop\EntityBundle\Entity\ShopContact') \Symfony\Component\Security\Core\Security $security,
->changeSelectedShop($security->getUser(), $shop_uuid); $shop_uuid,
) {
$em->getRepository('PSC\Shop\EntityBundle\Entity\ShopContact')->changeSelectedShop(
$security->getUser(),
$shop_uuid,
);
$request->getSession()->set('selectedShop', $shop_uuid); $request->getSession()->set('selectedShop', $shop_uuid);
return $this->redirect($this->generateUrl('psc_backend_dashboard_index')); return $this->redirect($this->generateUrl('psc_backend_dashboard_index'));
} }
@ -105,15 +125,20 @@ class ShopController extends AbstractController
* @return RedirectResponse * @return RedirectResponse
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
#[Route(path: '/shop/deleted/toogle', name: 'psc_backend_dashboard_toogle_deleted_shop')] #[Route(path: '/shop/deleted/toogle', name: 'psc_backend_dashboard_toogle_deleted_shop')]
public function toogleDisplayDeletedShopAction(Request $request, EntityManagerInterface $em, \Symfony\Component\Security\Core\Security $security, Shop $shopService) public function toogleDisplayDeletedShopAction(
{ Request $request,
EntityManagerInterface $em,
\Symfony\Component\Security\Core\Security $security,
Shop $shopService,
) {
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */ /** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
$selectedShop = $shopService->getSelectedShop(); $selectedShop = $shopService->getSelectedShop();
if (!!$request->getSession()->get('displayDeletedShop', false) && $selectedShop->isDeleted()) { if (!!$request->getSession()->get('displayDeletedShop', false) && $selectedShop->isDeleted()) {
$shops = $em $shops = $em->getRepository(
->getRepository('PSC\Shop\EntityBundle\Entity\ShopContact')->myEditableShopsWithNoDeleted($security->getUser()); 'PSC\Shop\EntityBundle\Entity\ShopContact',
)->myEditableShopsWithNoDeleted($security->getUser());
$request->getSession()->set('selectedShop', $shops[0]->getUid()); $request->getSession()->set('selectedShop', $shops[0]->getUid());
} }
$request->getSession()->set('displayDeletedShop', !$request->getSession()->get('displayDeletedShop', false)); $request->getSession()->set('displayDeletedShop', !$request->getSession()->get('displayDeletedShop', false));

View File

@ -31,8 +31,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
@ -65,8 +65,8 @@ class ListController extends \Symfony\Bundle\FrameworkBundle\Controller\Abstract
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/list/index', name: 'psc_backend_domain_list_index')] #[Route(path: '/list/index', name: 'psc_backend_domain_list_index')]
#[Template] #[Template('@PSCBackendDomain/backend/list/index.html.twig')]
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
public function indexAction(Request $request, Shop $shopService, DocumentManager $mongoService, EntityManagerInterface $em, DomainSync $sync) public function indexAction(Request $request, Shop $shopService, DocumentManager $mongoService, EntityManagerInterface $em, DomainSync $sync)
{ {
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */ /** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
@ -101,7 +101,7 @@ class ListController extends \Symfony\Bundle\FrameworkBundle\Controller\Abstract
* *
*/ */
#[Route(path: '/list/sync', name: 'psc_backend_domain_list_sync')] #[Route(path: '/list/sync', name: 'psc_backend_domain_list_sync')]
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
public function syncAction(DomainSync $sync) public function syncAction(DomainSync $sync)
{ {
$sync->syncDomains(); $sync->syncDomains();
@ -120,7 +120,7 @@ class ListController extends \Symfony\Bundle\FrameworkBundle\Controller\Abstract
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/list/delete/{uid}', name: 'psc_backend_domain_list_delete')] #[Route(path: '/list/delete/{uid}', name: 'psc_backend_domain_list_delete')]
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
public function deleteAction(Shop $shopService, EntityManagerInterface $entityManager, DocumentManager $mongoManager, $uid) public function deleteAction(Shop $shopService, EntityManagerInterface $entityManager, DocumentManager $mongoManager, $uid)
{ {
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */ /** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */

View File

@ -5,8 +5,8 @@ namespace PSC\Backend\ToolsBundle\Controller\Backend;
use PSC\Backend\ToolsBundle\Interfaces\ConfigurableElementInterface; use PSC\Backend\ToolsBundle\Interfaces\ConfigurableElementInterface;
use PSC\Backend\ToolsBundle\Service\ExporterRegistry; use PSC\Backend\ToolsBundle\Service\ExporterRegistry;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
@ -25,9 +25,9 @@ class ExporterController extends AbstractController
* @param ExporterRegistry $registry * @param ExporterRegistry $registry
* @return array * @return array
*/ */
#[Template] #[Template('@PSCBackendTools/backend/exporter/list.html.twig')]
#[Route(path: '/list', name: 'psc_backend_tools_exporter_list_index')] #[Route(path: '/list', name: 'psc_backend_tools_exporter_list_index')]
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
public function listAction(ExporterRegistry $registry) public function listAction(ExporterRegistry $registry)
{ {
return array('exporters' => $registry->all()); return array('exporters' => $registry->all());
@ -41,8 +41,8 @@ class ExporterController extends AbstractController
* @return array * @return array
*/ */
#[Route(path: '/{type}/export', name: 'psc_backend_tools_exporter_form')] #[Route(path: '/{type}/export', name: 'psc_backend_tools_exporter_form')]
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
#[Template] #[Template('@PSCBackendTools/backend/exporter/form.html.twig')]
public function formAction(Request $request, ExporterRegistry $registry, $type) public function formAction(Request $request, ExporterRegistry $registry, $type)
{ {
if (!$registry->has($type)) { if (!$registry->has($type)) {

View File

@ -6,8 +6,8 @@ use PSC\Backend\ToolsBundle\Interfaces\ConfigurableElementInterface;
use PSC\Backend\ToolsBundle\Service\ImporterRegistry; use PSC\Backend\ToolsBundle\Service\ImporterRegistry;
use Symfony\Component\DependencyInjection\Attribute\TaggedIterator; use Symfony\Component\DependencyInjection\Attribute\TaggedIterator;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
@ -23,9 +23,9 @@ class ImporterController extends AbstractController
dump($importer);die(); dump($importer);die();
} }
#[Template] #[Template('@PSCBackendTools/backend/importer/list.html.twig')]
#[Route(path: '/list', name: 'psc_backend_tools_importer_list_index')] #[Route(path: '/list', name: 'psc_backend_tools_importer_list_index')]
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
public function listAction(ImporterRegistry $registry) public function listAction(ImporterRegistry $registry)
{ {
return array('exporters' => $registry->all()); return array('exporters' => $registry->all());

View File

@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class GetParentByTitle extends AbstractController class GetParentByTitle extends AbstractController

View File

@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
class Get extends AbstractController class Get extends AbstractController
{ {

View File

@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
class Get extends AbstractController class Get extends AbstractController
{ {

View File

@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
class Get extends AbstractController class Get extends AbstractController
{ {

View File

@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class CreateByNr extends AbstractController class CreateByNr extends AbstractController

View File

@ -20,7 +20,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class GetByNr extends AbstractController class GetByNr extends AbstractController

View File

@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
class Info extends AbstractController class Info extends AbstractController
{ {

View File

@ -27,7 +27,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\AccessDeniedException; use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Component\Translation\Exception\NotFoundResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException;
/** /**

View File

@ -15,8 +15,8 @@ namespace PSC\Component\SteplayouterBundle\Calendar\Type;
use PSC\Component\SteplayouterBundle\Calendar\Type; use PSC\Component\SteplayouterBundle\Calendar\Type;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
/** /**
* DefaultController fürs ProductionBundle * DefaultController fürs ProductionBundle

View File

@ -15,8 +15,8 @@ namespace PSC\Component\SteplayouterBundle\Calendar\Type;
use PSC\Component\SteplayouterBundle\Calendar\Type; use PSC\Component\SteplayouterBundle\Calendar\Type;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
class Hochvariable extends Type class Hochvariable extends Type
{ {

View File

@ -15,8 +15,8 @@ namespace PSC\Component\SteplayouterBundle\Calendar\Type;
use PSC\Component\SteplayouterBundle\Calendar\Type; use PSC\Component\SteplayouterBundle\Calendar\Type;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
/** /**
* DefaultController fürs ProductionBundle * DefaultController fürs ProductionBundle

View File

@ -21,8 +21,8 @@ use PSC\Component\SteplayouterBundle\Calendar\Generator;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
/** /**
* CalendarController fürs SteplayouterBundle * CalendarController fürs SteplayouterBundle

View File

@ -14,8 +14,8 @@
namespace PSC\Component\SteplayouterBundle\Controller; namespace PSC\Component\SteplayouterBundle\Controller;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
/** /**
@ -33,7 +33,7 @@ class DefaultController extends AbstractController
* @return View * @return View
*/ */
#[Route(path: '/component/steplayouter', name: 'component_steplayouter')] #[Route(path: '/component/steplayouter', name: 'component_steplayouter')]
#[Template] #[Template('@PSCComponentSteplayouter/default/index.html.twig')]
public function indexAction() public function indexAction()
{ {
return array('stylePath' => '{{stylePath}}'); return array('stylePath' => '{{stylePath}}');

View File

@ -27,7 +27,7 @@ use PSC\Component\SteplayouterBundle\Service\Pdf;
use PSC\Shop\EntityBundle\Document\Motiv; use PSC\Shop\EntityBundle\Document\Motiv;
use PSC\Shop\EntityBundle\Entity\Layoutdesigndata; use PSC\Shop\EntityBundle\Entity\Layoutdesigndata;
use PSC\Shop\EntityBundle\Entity\Product; use PSC\Shop\EntityBundle\Entity\Product;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;

View File

@ -24,7 +24,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Exception\AccessDeniedException; use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Component\Translation\Exception\NotFoundResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException;
use PSC\Component\SteplayouterBundle\Config\Converter\ToArray; use PSC\Component\SteplayouterBundle\Config\Converter\ToArray;

View File

@ -26,7 +26,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\AccessDeniedException; use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Component\Translation\Exception\NotFoundResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException;
/** /**

View File

@ -25,8 +25,8 @@ use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -45,8 +45,8 @@ class CheckController extends AbstractController
* @return View * @return View
*/ */
#[Route(path: '/check/index', name: 'psc_component_steplayouter_system_check_index')] #[Route(path: '/check/index', name: 'psc_component_steplayouter_system_check_index')]
#[Template] #[Template('@PSCComponentSteplayouter/system/check/index.html.twig')]
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
public function indexAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager) public function indexAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager)
{ {
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */ /** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */

View File

@ -25,8 +25,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -49,8 +49,8 @@ class SettingsController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/settings/index', name: 'psc_component_steplayouter_system_settings_index')] #[Route(path: '/settings/index', name: 'psc_component_steplayouter_system_settings_index')]
#[Template] #[Template('@PSCComponentSteplayouter/system/settings/index.html.twig')]
#[Security("is_granted('ROLE_SHOP')")] #[IsGranted('ROLE_SHOP')]
public function indexAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, DocumentManager $documentManager) public function indexAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, DocumentManager $documentManager)
{ {
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */ /** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */

View File

@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace PSC\Libraries\DoctrineBundle\DBAL\Platform;
use Doctrine\DBAL\Platforms\MariaDBPlatform as BaseMariaDBPlatform;
/**
* Custom MariaDB Platform to support all MariaDB versions
*/
class MariaDBPlatform extends BaseMariaDBPlatform
{
// This class extends the base MariaDB platform
// and can be used to add custom functionality if needed
}

View File

@ -31,8 +31,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -70,7 +70,7 @@ class EditController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/edit/create', name: 'psc_shop_account_backend_create')] #[Route(path: '/edit/create', name: 'psc_shop_account_backend_create')]
#[Template] #[Template('@PSCShopAccount/backend/edit/create.html.twig')]
public function createAction( public function createAction(
Request $request, Request $request,
Field $fieldService, Field $fieldService,
@ -145,7 +145,7 @@ class EditController extends AbstractController
* @throws \Doctrine\ODM\MongoDB\MongoDBException * @throws \Doctrine\ODM\MongoDB\MongoDBException
*/ */
#[Route(path: '/edit/edit/{uuid}', name: 'psc_shop_account_backend_edit')] #[Route(path: '/edit/edit/{uuid}', name: 'psc_shop_account_backend_edit')]
#[Template] #[Template('@PSCShopAccount/backend/edit/edit.html.twig')]
public function editAction( public function editAction(
Request $request, Request $request,
Field $fieldService, Field $fieldService,

View File

@ -27,8 +27,8 @@ use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -53,9 +53,9 @@ class ListController extends AbstractController
* @return array * @return array
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Security("is_granted('ROLE_ADMIN')")] #[IsGranted('ROLE_ADMIN')]
#[Route(path: '/list/index', name: 'psc_shop_account_backend_list')] #[Route(path: '/list/index', name: 'psc_shop_account_backend_list')]
#[Template] #[Template('@PSCShopAccount/backend/list/index.html.twig')]
public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, PaginatorInterface $paginator, FilterBuilderUpdaterInterface $filterBuilderUpdater, SessionInterface $session) public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, PaginatorInterface $paginator, FilterBuilderUpdaterInterface $filterBuilderUpdater, SessionInterface $session)
{ {

View File

@ -18,7 +18,7 @@ use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

View File

@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

View File

@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

View File

@ -35,8 +35,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -74,7 +74,7 @@ class EditController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/create', name: 'psc_shop_cms_backend_edit_create')] #[Route(path: '/create', name: 'psc_shop_cms_backend_edit_create')]
#[Template] #[Template('@PSCShopCms/backend/edit/create.html.twig')]
public function createAction( public function createAction(
Request $request, Request $request,
Field $fieldService, Field $fieldService,
@ -138,7 +138,7 @@ class EditController extends AbstractController
* @throws \Doctrine\ODM\MongoDB\MongoDBException * @throws \Doctrine\ODM\MongoDB\MongoDBException
*/ */
#[Route(path: '/edit/{uid}', name: 'psc_shop_cms_backend_edit_edit')] #[Route(path: '/edit/{uid}', name: 'psc_shop_cms_backend_edit_edit')]
#[Template] #[Template('@PSCShopCms/backend/edit/edit.html.twig')]
public function editAction( public function editAction(
Request $request, Request $request,
Field $fieldService, Field $fieldService,
@ -221,7 +221,7 @@ class EditController extends AbstractController
* @return array|View|\Symfony\Component\HttpFoundation\RedirectResponse * @return array|View|\Symfony\Component\HttpFoundation\RedirectResponse
*/ */
#[Route(path: '/delete/{uid}', name: 'psc_shop_cms_backend_edit_delete')] #[Route(path: '/delete/{uid}', name: 'psc_shop_cms_backend_edit_delete')]
#[Template] #[Template('@PSCShopCms/backend/edit/delete.html.twig')]
public function deleteAction( public function deleteAction(
Request $request, Request $request,
EntityManagerInterface $entityManager, EntityManagerInterface $entityManager,

View File

@ -25,8 +25,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -45,7 +45,7 @@ class ListController extends AbstractController
* @return array|View * @return array|View
*/ */
#[Route(path: '/list', name: 'psc_shop_cms_backend_list')] #[Route(path: '/list', name: 'psc_shop_cms_backend_list')]
#[Template] #[Template('@PSCShopCms/backend/list/index.html.twig')]
public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, FilterBuilderUpdaterInterface $filterBuilderUpdater, PaginatorInterface $paginator, ThemeSource $sourceService) public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, FilterBuilderUpdaterInterface $filterBuilderUpdater, PaginatorInterface $paginator, ThemeSource $sourceService)
{ {

View File

@ -20,8 +20,8 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -44,7 +44,7 @@ class ShowController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/{url}', name: 'psc_shop_cms_frontend_show')] #[Route(path: '/{url}', name: 'psc_shop_cms_frontend_show')]
#[Template] #[Template('@PSCShopCms/frontend/show/index.html.twig')]
public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, $url) public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, $url)
{ {

View File

@ -44,8 +44,8 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Twig\Environment; use Twig\Environment;
use Twig_Environment; use Twig_Environment;
@ -78,7 +78,7 @@ class OrderController extends AbstractController
* @internal param bool $enableDelivery * @internal param bool $enableDelivery
*/ */
#[Route(path: '/order/mail/{uuid}', defaults: ['enableDelivery' => 0], name: 'psc_shop_communication_backend_order_mail')] #[Route(path: '/order/mail/{uuid}', defaults: ['enableDelivery' => 0], name: 'psc_shop_communication_backend_order_mail')]
#[Template] #[Template('@PSCShopCommunication/backend/order/mail.html.twig')]
public function mailAction(Request $request, SessionInterface $session, Manager $eventManager, Shop $shopService, DocumentManager $documentManager, Environment $twig, EntityManagerInterface $entityManager, $uuid = "") public function mailAction(Request $request, SessionInterface $session, Manager $eventManager, Shop $shopService, DocumentManager $documentManager, Environment $twig, EntityManagerInterface $entityManager, $uuid = "")
{ {

View File

@ -8,7 +8,7 @@ use PSC\Shop\ContactBundle\Dto\Address\Create\Input;
use PSC\Shop\ContactBundle\Dto\Address\Create\Output; use PSC\Shop\ContactBundle\Dto\Address\Create\Output;
use PSC\Shop\ContactBundle\Repository\AddressRepository; use PSC\Shop\ContactBundle\Repository\AddressRepository;
use PSC\Shop\ContactBundle\Transformer\Model\Address; use PSC\Shop\ContactBundle\Transformer\Model\Address;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;

View File

@ -10,7 +10,7 @@ use PSC\Shop\ContactBundle\Model\Address;
use PSC\Shop\EntityBundle\Entity\Contact; use PSC\Shop\EntityBundle\Entity\Contact;
use PSC\Shop\EntityBundle\Entity\ContactAddress; use PSC\Shop\EntityBundle\Entity\ContactAddress;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;

View File

@ -9,7 +9,7 @@ use Nelmio\ApiDocBundle\Annotation\Model;
use PSC\Shop\ContactBundle\Dto\All\Output; use PSC\Shop\ContactBundle\Dto\All\Output;
use PSC\Shop\ContactBundle\Model\Contact; use PSC\Shop\ContactBundle\Model\Contact;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;

View File

@ -10,7 +10,7 @@ use Nelmio\ApiDocBundle\Annotation\Security;
use PSC\Shop\ContactBundle\Dto\All\Output; use PSC\Shop\ContactBundle\Dto\All\Output;
use PSC\Shop\ContactBundle\Model\Contact; use PSC\Shop\ContactBundle\Model\Contact;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;

View File

@ -8,7 +8,7 @@ use Nelmio\ApiDocBundle\Annotation\Security;
use PSC\Shop\ContactBundle\Dto\Create\Input; use PSC\Shop\ContactBundle\Dto\Create\Input;
use PSC\Shop\ContactBundle\Dto\Create\Output; use PSC\Shop\ContactBundle\Dto\Create\Output;
use PSC\Shop\ContactBundle\Repository\ContactRepository; use PSC\Shop\ContactBundle\Repository\ContactRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use setasign\Fpdi\PdfReader\DataStructure\Rectangle; use setasign\Fpdi\PdfReader\DataStructure\Rectangle;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

View File

@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class Exists extends AbstractController class Exists extends AbstractController

View File

@ -8,7 +8,7 @@ use PSC\Shop\ContactBundle\Dto\Refresh\Output;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface; use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface;
use OpenApi\Attributes as OA; use OpenApi\Attributes as OA;

View File

@ -16,7 +16,7 @@ use PSC\System\SettingsBundle\Service\Log;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
class AddressDetailController extends AbstractController class AddressDetailController extends AbstractController
@ -44,7 +44,7 @@ class AddressDetailController extends AbstractController
* @throws \Doctrine\ODM\MongoDB\MongoDBException * @throws \Doctrine\ODM\MongoDB\MongoDBException
*/ */
#[Route(path: '/address/detail/edit/{uuid}', name: 'psc_shop_contact_backend_address_detail_edit')] #[Route(path: '/address/detail/edit/{uuid}', name: 'psc_shop_contact_backend_address_detail_edit')]
#[Template] #[Template('@PSCShopContact/backend/addressdetail/edit.html.twig')]
public function editAction( public function editAction(
Request $request, Request $request,
EntityManagerInterface $entityManager, EntityManagerInterface $entityManager,
@ -129,7 +129,7 @@ class AddressDetailController extends AbstractController
* @throws \Doctrine\ODM\MongoDB\MongoDBException * @throws \Doctrine\ODM\MongoDB\MongoDBException
*/ */
#[Route(path: '/address/detail/create/{contactUUID}', name: 'psc_shop_contact_backend_address_detail_create')] #[Route(path: '/address/detail/create/{contactUUID}', name: 'psc_shop_contact_backend_address_detail_create')]
#[Template] #[Template('@PSCShopContact/backend/addressdetail/create.html.twig')]
public function createAction( public function createAction(
Request $request, Request $request,
EntityManagerInterface $entityManager, EntityManagerInterface $entityManager,
@ -192,7 +192,7 @@ class AddressDetailController extends AbstractController
* @throws \Doctrine\ODM\MongoDB\MongoDBException * @throws \Doctrine\ODM\MongoDB\MongoDBException
*/ */
#[Route(path: '/edit/delete/{uuid}', name: 'psc_shop_contact_backend_address_detail_delete')] #[Route(path: '/edit/delete/{uuid}', name: 'psc_shop_contact_backend_address_detail_delete')]
#[Template] #[Template('@PSCShopContact/backend/addressdetail/delete.html.twig')]
public function deleteAction( public function deleteAction(
Request $request, Request $request,
EntityManagerInterface $entityManager, EntityManagerInterface $entityManager,

View File

@ -34,8 +34,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -58,7 +58,7 @@ class AddressImportController extends AbstractController
* @throws \PhpOffice\PhpSpreadsheet\Reader\Exception * @throws \PhpOffice\PhpSpreadsheet\Reader\Exception
*/ */
#[Route(path: '/address/import/step1/{uuid}', name: 'psc_shop_contact_backend_address_import_step1')] #[Route(path: '/address/import/step1/{uuid}', name: 'psc_shop_contact_backend_address_import_step1')]
#[Template] #[Template('@PSCShopContact/backend/addressimport/step1.html.twig')]
public function step1Action( public function step1Action(
Request $request, Request $request,
EntityManagerInterface $entityManager, EntityManagerInterface $entityManager,
@ -111,7 +111,7 @@ class AddressImportController extends AbstractController
* @return array|View|\Symfony\Component\HttpFoundation\RedirectResponse * @return array|View|\Symfony\Component\HttpFoundation\RedirectResponse
*/ */
#[Route(path: '/address/import/step2/{uuid}', name: 'psc_shop_contact_backend_address_import_step2')] #[Route(path: '/address/import/step2/{uuid}', name: 'psc_shop_contact_backend_address_import_step2')]
#[Template] #[Template('@PSCShopContact/backend/addressimport/step2.html.twig')]
public function step2Action( public function step2Action(
Request $request, Request $request,
EntityManagerInterface $entityManager, EntityManagerInterface $entityManager,
@ -151,7 +151,7 @@ class AddressImportController extends AbstractController
* @throws \PhpOffice\PhpSpreadsheet\Reader\Exception * @throws \PhpOffice\PhpSpreadsheet\Reader\Exception
*/ */
#[Route(path: '/address/import/step3/{uuid}', name: 'psc_shop_contact_backend_address_import_step3')] #[Route(path: '/address/import/step3/{uuid}', name: 'psc_shop_contact_backend_address_import_step3')]
#[Template] #[Template('@PSCShopContact/backend/addressimport/step3.html.twig')]
public function step3Action( public function step3Action(
Request $request, Request $request,
EntityManagerInterface $entityManager, EntityManagerInterface $entityManager,

View File

@ -45,8 +45,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use PSC\System\SettingsBundle\Service\Status; use PSC\System\SettingsBundle\Service\Status;
@ -94,7 +94,7 @@ class EditController extends AbstractController
} }
#[Route(path: '/edit/create', name: 'psc_shop_contact_backend_create')] #[Route(path: '/edit/create', name: 'psc_shop_contact_backend_create')]
#[Template] #[Template('@PSCShopContact/backend/edit/create.html.twig')]
public function createAction( public function createAction(
Request $request, Request $request,
Field $fieldService, Field $fieldService,
@ -229,7 +229,7 @@ class EditController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/edit/edit/{uuid}', name: 'psc_shop_contact_backend_edit')] #[Route(path: '/edit/edit/{uuid}', name: 'psc_shop_contact_backend_edit')]
#[Template] #[Template('@PSCShopContact/backend/edit/edit.html.twig')]
public function editAction( public function editAction(
Request $request, Request $request,
Field $fieldService, Field $fieldService,
@ -506,7 +506,7 @@ class EditController extends AbstractController
* @return array|\Symfony\Component\HttpFoundation\RedirectResponse * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
*/ */
#[Route(path: '/edit/anonymisieren/{uuid}', name: 'psc_shop_contact_backend_edit_anonymisieren')] #[Route(path: '/edit/anonymisieren/{uuid}', name: 'psc_shop_contact_backend_edit_anonymisieren')]
#[Template] #[Template('@PSCShopContact/backend/edit/anonymisieren.html.twig')]
public function anonymisierenAction( public function anonymisierenAction(
Request $request, Request $request,
\PSC\System\SettingsBundle\Service\Shop $shopService, \PSC\System\SettingsBundle\Service\Shop $shopService,

View File

@ -22,8 +22,8 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -41,9 +41,9 @@ class ListController extends AbstractController
* *
* @return array * @return array
*/ */
#[Security("is_granted('ROLE_ADMIN')")] #[IsGranted('ROLE_ADMIN')]
#[Route(path: '/list/index', name: 'psc_shop_contact_backend_list')] #[Route(path: '/list/index', name: 'psc_shop_contact_backend_list')]
#[Template] #[Template('@PSCShopContact/backend/list/index.html.twig')]
public function indexAction( public function indexAction(
Request $request, Request $request,
RequestStack $requestStack, RequestStack $requestStack,

View File

@ -26,8 +26,10 @@ use Symfony\Component\Security\Core\User\UserInterface;
class ContactRepository extends ServiceEntityRepository implements UserLoaderInterface class ContactRepository extends ServiceEntityRepository implements UserLoaderInterface
{ {
public function __construct(ManagerRegistry $registry, private readonly \PSC\System\SettingsBundle\Service\Shop $shopService) public function __construct(
{ ManagerRegistry $registry,
private readonly \PSC\System\SettingsBundle\Service\Shop $shopService,
) {
parent::__construct($registry, Contact::class); parent::__construct($registry, Contact::class);
} }
@ -54,7 +56,7 @@ class ContactRepository extends ServiceEntityRepository implements UserLoaderInt
->getQuery() ->getQuery()
->getOneOrNullResult(); ->getOneOrNullResult();
if(null === $user) { if (null === $user) {
$user = $this->loadUserByUid($username); $user = $this->loadUserByUid($username);
} }
if (null === $user) { if (null === $user) {
@ -77,10 +79,13 @@ class ContactRepository extends ServiceEntityRepository implements UserLoaderInt
public function getContactByEmailAndPasswordAndShop($mail, $password, $shopId) public function getContactByEmailAndPasswordAndShop($mail, $password, $shopId)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()
->createQuery(' ->createQuery(
'
SELECT s FROM PSC\Shop\EntityBundle\Entity\ShopContact s SELECT s FROM PSC\Shop\EntityBundle\Entity\ShopContact s
JOIN s.contact c JOIN s.contact c
WHERE c.enable = 1 AND c.username = :username AND c.password = :password AND s.shop = :shop_id')->setParameter('username', $mail) WHERE c.enable = 1 AND c.username = :username AND c.password = :password AND s.shop = :shop_id',
)
->setParameter('username', $mail)
->setParameter('password', $password) ->setParameter('password', $password)
->setParameter('shop_id', $shopId); ->setParameter('shop_id', $shopId);
try { try {
@ -104,7 +109,8 @@ class ContactRepository extends ServiceEntityRepository implements UserLoaderInt
->createQuery(' ->createQuery('
SELECT s FROM PSC\Shop\EntityBundle\Entity\ShopContact s SELECT s FROM PSC\Shop\EntityBundle\Entity\ShopContact s
JOIN s.contact c JOIN s.contact c
WHERE c.enable = 1 AND c.username = :username AND s.shop = :shop_id')->setParameter('username', $mail) WHERE c.enable = 1 AND c.username = :username AND s.shop = :shop_id')
->setParameter('username', $mail)
->setParameter('shop_id', $shopId); ->setParameter('shop_id', $shopId);
try { try {
return $query->getSingleResult(); return $query->getSingleResult();
@ -123,11 +129,12 @@ class ContactRepository extends ServiceEntityRepository implements UserLoaderInt
*/ */
public function getContactsByShop(PSCShop $shop) public function getContactsByShop(PSCShop $shop)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery(
->createQuery(' '
SELECT s FROM PSCEntityBundle:ShopContact s SELECT s FROM PSC\Shop\EntityBundle\Entity\ShopContact s
JOIN s.contact c JOIN s.contact c
WHERE c.enable = 1 AND s.shop = :shop_id')->setParameter('shop_id', $shop->getId()); WHERE c.enable = 1 AND s.shop = :shop_id',
)->setParameter('shop_id', $shop->getId());
try { try {
return $query->getResult(); return $query->getResult();
} catch (\Doctrine\ORM\NoResultException $e) { } catch (\Doctrine\ORM\NoResultException $e) {
@ -135,15 +142,14 @@ class ContactRepository extends ServiceEntityRepository implements UserLoaderInt
} }
} }
public function mySelectedShop(Contact $contact) public function mySelectedShop(Contact $contact)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery(
->createQuery(' '
SELECT sc FROM PSCEntityBundle:ShopContact sc SELECT sc FROM PSC\Shop\EntityBundle\Entity\ShopContact sc
JOIN sc.shop s JOIN sc.shop s
WHERE sc.contact = :id AND sc.selected = 1 ORDER BY sc.admin ASC, s.title ASC')->setParameter('id', $contact->getId()); WHERE sc.contact = :id AND sc.selected = 1 ORDER BY sc.admin ASC, s.title ASC',
)->setParameter('id', $contact->getId());
try { try {
$shop = $query->getOneOrNullResult(); $shop = $query->getOneOrNullResult();
} catch (\Doctrine\ORM\NoResultException $e) { } catch (\Doctrine\ORM\NoResultException $e) {
@ -153,18 +159,20 @@ class ContactRepository extends ServiceEntityRepository implements UserLoaderInt
if (!$shop) { if (!$shop) {
$query = $this->getEntityManager() $query = $this->getEntityManager()
->createQuery(' ->createQuery('
SELECT sc FROM PSCEntityBundle:ShopContact sc SELECT sc FROM PSC\Shop\EntityBundle\Entity\ShopContact sc
JOIN sc.shop s JOIN sc.shop s
WHERE sc.contact = :id ORDER BY sc.admin ASC, s.title ASC')->setParameter('id', $contact->getId()) WHERE sc.contact = :id ORDER BY sc.admin ASC, s.title ASC')
->setParameter('id', $contact->getId())
->setMaxResults(1); ->setMaxResults(1);
$shop = $query->getOneOrNullResult(); $shop = $query->getOneOrNullResult();
if ($shop) { if ($shop) {
$this->getEntityManager() $this->getEntityManager()
->createQuery(' ->createQuery('
UPDATE PSCEntityBundle:ShopContact sc SET sc.selected=1 UPDATE PSC\Shop\EntityBundle\Entity\ShopContact sc SET sc.selected=1
WHERE sc.contact = :id AND sc.shop = :shop_id')->setParameter('id', $contact->getId()) WHERE sc.contact = :id AND sc.shop = :shop_id')
->setParameter('shop_id', $shop->getShop()->getUid()) ->setParameter('id', $contact->getId())
->execute(); ->setParameter('shop_id', $shop->getShop()->getUid())
->execute();
return $shop->getShop(); return $shop->getShop();
} }
} }
@ -172,14 +180,14 @@ class ContactRepository extends ServiceEntityRepository implements UserLoaderInt
return $shop->getShop(); return $shop->getShop();
} }
public function loadUserByIdentifier(string $identifier): ?UserInterface public function loadUserByIdentifier(string $identifier): null|UserInterface
{ {
$shop = $this->shopService->getShopByDomain(); $shop = $this->shopService->getShopByDomain();
$user = $this->getEntityManager() $user = $this->getEntityManager()->getRepository(Contact::class)->getContactByEmailAndShop(
->getRepository(Contact::class) $identifier,
->getContactByEmailAndShop($identifier, $shop->getUid()); $shop->getUid(),
);
if (!$user) { if (!$user) {
// fail authentication with a custom error // fail authentication with a custom error
@ -190,12 +198,12 @@ class ContactRepository extends ServiceEntityRepository implements UserLoaderInt
return $user; return $user;
} }
public function getLastCreatedContacts(PSCShop $selectedShop, int $limit): array public function getLastCreatedContacts(PSCShop $selectedShop, int $limit): array
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()
->createQuery(' ->createQuery('
SELECT c FROM PSCEntityBundle:Contact c SELECT c FROM PSC\Shop\EntityBundle\Entity\Contact c
JOIN c.shops s JOIN c.shops s
WHERE s.uid = :id ORDER BY c.createdAt DESC') WHERE s.uid = :id ORDER BY c.createdAt DESC')
->setParameter('id', $selectedShop->getUid()) ->setParameter('id', $selectedShop->getUid())

View File

@ -23,8 +23,8 @@ use PSC\Shop\EntityBundle\Entity\ShopContact;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use Ramsey\Uuid\Uuid; use Ramsey\Uuid\Uuid;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
@ -39,9 +39,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
#[Route(path: '/create/copy')] #[Route(path: '/create/copy')]
class CopyController extends AbstractController class CopyController extends AbstractController
{ {
#[Template] #[Template('@PSCShopCreate/backend/copy/index.html.twig')]
#[Route(path: '/index', name: 'psc_shop_create_backend_copy_index')] #[Route(path: '/index', name: 'psc_shop_create_backend_copy_index')]
#[Security("is_granted('ROLE_ADMIN')")] #[IsGranted('ROLE_ADMIN')]
public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, DocumentManager $documentManager, Registry $registrys) public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, DocumentManager $documentManager, Registry $registrys)
{ {
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */ /** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */

View File

@ -15,8 +15,8 @@ use PSC\Shop\EntityBundle\Entity\ShopAccount;
use PSC\Shop\EntityBundle\Entity\ShopContact; use PSC\Shop\EntityBundle\Entity\ShopContact;
use Ramsey\Uuid\Uuid; use Ramsey\Uuid\Uuid;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
@ -31,9 +31,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
#[Route(path: '/start')] #[Route(path: '/start')]
class StartController extends AbstractController class StartController extends AbstractController
{ {
#[Template] #[Template('@PSCShopCreate/backend/start/index.html.twig')]
#[Route(path: '/index', name: 'psc_shop_create_backend_start_index')] #[Route(path: '/index', name: 'psc_shop_create_backend_start_index')]
#[Security("is_granted('ROLE_ADMIN')")] #[IsGranted('ROLE_ADMIN')]
public function indexAction( public function indexAction(
Request $request, Request $request,
\PSC\System\SettingsBundle\Service\Shop $shopService, \PSC\System\SettingsBundle\Service\Shop $shopService,

View File

@ -23,7 +23,7 @@ class AccountRepository extends ServiceEntityRepository
public function getAccountsByShop(Shop $shop) public function getAccountsByShop(Shop $shop)
{ {
$query = $this->getEntityManager()->createQuery(' $query = $this->getEntityManager()->createQuery('
SELECT s FROM PSCEntityBundle:ShopAccount s SELECT s FROM PSC\Shop\EntityBundle\Entity\ShopAccount s
JOIN s.account a JOIN s.account a
WHERE s.shop = :shop_id')->setParameter( WHERE s.shop = :shop_id')->setParameter(
'shop_id', 'shop_id',

View File

@ -28,10 +28,12 @@ class CmsRepository extends EntityRepository
{ {
public function findAllByShop(Shop $shop) public function findAllByShop(Shop $shop)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery('
->createQuery(' SELECT c FROM PSC\Shop\EntityBundle\Entity\Cms c
SELECT c FROM PSCEntityBundle:Cms c WHERE c.shop = :shop_id')->setParameter(
WHERE c.shop = :shop_id')->setParameter('shop_id', $shop->getId()); 'shop_id',
$shop->getId(),
);
try { try {
return $query->execute(); return $query->execute();
} catch (\Doctrine\ORM\NoResultException $e) { } catch (\Doctrine\ORM\NoResultException $e) {

View File

@ -37,10 +37,12 @@ class DomainRepository extends EntityRepository
*/ */
public function getAllByShopId(Shop $shop) public function getAllByShopId(Shop $shop)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery('
->createQuery(' SELECT p FROM PSC\Shop\EntityBundle\Entity\Domain p
SELECT p FROM PSCEntityBundle:Domain p WHERE p.shop = :shop_id')->setParameter(
WHERE p.shop = :shop_id')->setParameter('shop_id', $shop->getId()); 'shop_id',
$shop->getId(),
);
try { try {
return $query->execute(); return $query->execute();
} catch (\Doctrine\ORM\NoResultException $e) { } catch (\Doctrine\ORM\NoResultException $e) {

View File

@ -40,7 +40,7 @@ class MotivRepository extends EntityRepository
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()
->createQuery(' ->createQuery('
SELECT m FROM PSCEntityBundle:Motiv m SELECT m FROM PSC\Shop\EntityBundle\Entity\Motiv m
JOIN m.shop s JOIN m.shop s
WHERE m.resale_shop = 1 AND s.uuid = :shop_uuid') WHERE m.resale_shop = 1 AND s.uuid = :shop_uuid')
->setParameter('shop_uuid', $shopUuId) ->setParameter('shop_uuid', $shopUuId)
@ -62,12 +62,12 @@ class MotivRepository extends EntityRepository
*/ */
public function countMotiveByShopUuid($shopUuId) public function countMotiveByShopUuid($shopUuId)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery(
->createQuery(' '
SELECT count(m.uuid) FROM PSCEntityBundle:Motiv m SELECT count(m.uuid) FROM PSC\Shop\EntityBundle\Entity\Motiv m
JOIN m.shop s JOIN m.shop s
WHERE m.resale_shop = 1 AND s.uuid = :shop_uuid') WHERE m.resale_shop = 1 AND s.uuid = :shop_uuid',
->setParameter('shop_uuid', $shopUuId); )->setParameter('shop_uuid', $shopUuId);
try { try {
return $query->getSingleScalarResult(); return $query->getSingleScalarResult();
} catch (\Doctrine\ORM\NoResultException $e) { } catch (\Doctrine\ORM\NoResultException $e) {
@ -89,7 +89,7 @@ class MotivRepository extends EntityRepository
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()
->createQuery(' ->createQuery('
SELECT m FROM PSCEntityBundle:Motiv m SELECT m FROM PSC\Shop\EntityBundle\Entity\Motiv m
JOIN m.shop s JOIN m.shop s
WHERE s.uuid = :shop_uuid WHERE s.uuid = :shop_uuid
AND m.contact = :contact') AND m.contact = :contact')

View File

@ -36,13 +36,15 @@ class OrderRepository extends ServiceEntityRepository
public function getIncomeByShop($shopUuId, $year) public function getIncomeByShop($shopUuId, $year)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery('
->createQuery(' SELECT sum(o.brutto) as brutto, MONTH(o.created) as monat FROM PSC\Shop\EntityBundle\Entity\Order o
SELECT sum(o.brutto) as brutto, MONTH(o.created) as monat FROM PSCEntityBundle:Order o
JOIN o.shop s JOIN o.shop s
WHERE o.status <> 170 AND s.uid = :shop_uuid AND o.type = 1 AND o.created >= \'' . $year . '-01-01\' AND o.created <= \'' . $year . '-12-31\' WHERE o.status <> 170 AND s.uid = :shop_uuid AND o.type = 1 AND o.created >= \'' .
GROUP BY monat ORDER BY o.created ASC') $year .
->setParameter('shop_uuid', $shopUuId); '-01-01\' AND o.created <= \'' .
$year .
'-12-31\'
GROUP BY monat ORDER BY o.created ASC')->setParameter('shop_uuid', $shopUuId);
try { try {
return $query->getArrayResult(); return $query->getArrayResult();
} catch (\Doctrine\ORM\NoResultException $e) { } catch (\Doctrine\ORM\NoResultException $e) {
@ -52,10 +54,10 @@ class OrderRepository extends ServiceEntityRepository
public function getLastEntity() public function getLastEntity()
{ {
return $this->createQueryBuilder('o')-> return $this->createQueryBuilder('o')
orderBy('o.created', 'DESC')-> ->orderBy('o.created', 'DESC')
setMaxResults(1)-> ->setMaxResults(1)
getQuery()-> ->getQuery()
getOneOrNullResult(); ->getOneOrNullResult();
} }
} }

View File

@ -37,7 +37,9 @@ class ProductProductgroupRepository extends EntityRepository
{ {
$this->getEntityManager() $this->getEntityManager()
->createQuery(' ->createQuery('
DELETE FROM PSCEntityBundle:ProductProductgroup p DELETE FROM PSC\Shop\EntityBundle\Entity\ProductProductgroup p
WHERE p.product = :product_id')->setParameter('product_id', $productId)->execute(); WHERE p.product = :product_id')
->setParameter('product_id', $productId)
->execute();
} }
} }

View File

@ -33,6 +33,7 @@ class ProductRepository extends ServiceEntityRepository
{ {
parent::__construct($registry, Product::class); parent::__construct($registry, Product::class);
} }
/** /**
* Gibt alle Produkte zurück; * Gibt alle Produkte zurück;
* *
@ -46,26 +47,27 @@ class ProductRepository extends ServiceEntityRepository
*/ */
public function getAllByShopIdWithPagination($shopId, $start, $limit, $sort, $filters) public function getAllByShopIdWithPagination($shopId, $start, $limit, $sort, $filters)
{ {
$sortTemp = ""; $sortTemp = '';
$clauses = array(); $clauses = [];
if (!empty($sort)) { if (!empty($sort)) {
$sortTemp = " ORDER BY"; $sortTemp = ' ORDER BY';
foreach ($sort as $field) { foreach ($sort as $field) {
$sortTemp .= ' p.' . $field['property'] . ' ' . $field['direction']; $sortTemp .= ' p.' . $field['property'] . ' ' . $field['direction'];
} }
} }
foreach ($filters as $filter) { foreach ($filters as $filter) {
$clauses[] = "p." . $filter['expression'] . ' ' . $filter['value']; $clauses[] = 'p.' . $filter['expression'] . ' ' . $filter['value'];
} }
if (count($clauses) > 0) { if (count($clauses) > 0) {
$sortTemp = " AND " . implode(' AND ', $clauses) . $sortTemp; $sortTemp = ' AND ' . implode(' AND ', $clauses) . $sortTemp;
} }
$query = $this->getEntityManager() $query = $this->getEntityManager()
->createQuery(' ->createQuery('
SELECT p FROM PSCEntityBundle:Product p SELECT p FROM PSC\Shop\EntityBundle\Entity\Product p
WHERE p.shop = :shop_id' . $sortTemp)->setParameter('shop_id', $shopId) WHERE p.shop = :shop_id' . $sortTemp)
->setParameter('shop_id', $shopId)
->setMaxResults($limit) ->setMaxResults($limit)
->setFirstResult($start); ->setFirstResult($start);
try { try {
@ -84,10 +86,12 @@ class ProductRepository extends ServiceEntityRepository
*/ */
public function getAllByShopId($shopId) public function getAllByShopId($shopId)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery('
->createQuery(' SELECT p FROM PSC\Shop\EntityBundle\Entity\Product p
SELECT p FROM PSCEntityBundle:Product p WHERE p.shop = :shop_id')->setParameter(
WHERE p.shop = :shop_id')->setParameter('shop_id', $shopId); 'shop_id',
$shopId,
);
try { try {
return count($query->execute()); return count($query->execute());
} catch (\Doctrine\ORM\NoResultException $e) { } catch (\Doctrine\ORM\NoResultException $e) {
@ -104,18 +108,19 @@ class ProductRepository extends ServiceEntityRepository
*/ */
public function getAllByProductgroup(Productgroup $group, $json) public function getAllByProductgroup(Productgroup $group, $json)
{ {
$query = 'SELECT p FROM PSCEntityBundle:Product p $query = 'SELECT p FROM PSC\Shop\EntityBundle\Entity\Product p
JOIN p.product_groups c JOIN p.product_groups c
WHERE c.uid = :articlegroup_id AND p.enable = 1 AND p.private = 0'; WHERE c.uid = :articlegroup_id AND p.enable = 1 AND p.private = 0';
if (isset($json['upload_steplayouter2'])) { if (isset($json['upload_steplayouter2'])) {
$query .= ' AND p.uploadSteplayouter2 = :upload_steplayouter2'; $query .= ' AND p.uploadSteplayouter2 = :upload_steplayouter2';
} }
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery($query . ' ORDER BY p.pos ASC')->setParameter(
->createQuery($query . ' ORDER BY p.pos ASC') 'articlegroup_id',
->setParameter('articlegroup_id', $group->getUid()); $group->getUid(),
);
if (isset($json['upload_steplayouter2'])) { if (isset($json['upload_steplayouter2'])) {
$query = $query->setParameter("upload_steplayouter2", $json['upload_steplayouter2']); $query = $query->setParameter('upload_steplayouter2', $json['upload_steplayouter2']);
} }
try { try {
@ -127,10 +132,9 @@ class ProductRepository extends ServiceEntityRepository
public function updateTaxes($shop, $from, $to) public function updateTaxes($shop, $from, $to)
{ {
$this->getEntityManager() $this->getEntityManager()
->createQuery(' ->createQuery('
UPDATE PSCEntityBundle:Product p SET p.mwert=:to UPDATE PSC\Shop\EntityBundle\Entity\Product p SET p.mwert=:to
WHERE p.mwert = :from AND p.shop = :shop_id') WHERE p.mwert = :from AND p.shop = :shop_id')
->setParameter('from', $from) ->setParameter('from', $from)
->setParameter('to', $to) ->setParameter('to', $to)

View File

@ -36,10 +36,12 @@ class ProductgroupRepository extends EntityRepository
*/ */
public function getAllByShopId($shopId) public function getAllByShopId($shopId)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery('
->createQuery(' SELECT p FROM PSC\Shop\EntityBundle\Entity\Productgroup p
SELECT p FROM PSCEntityBundle:Productgroup p WHERE p.shop = :shop_id')->setParameter(
WHERE p.shop = :shop_id')->setParameter('shop_id', $shopId); 'shop_id',
$shopId,
);
try { try {
return $query->getArrayResult(); return $query->getArrayResult();
} catch (\Doctrine\ORM\NoResultException $e) { } catch (\Doctrine\ORM\NoResultException $e) {
@ -57,19 +59,21 @@ class ProductgroupRepository extends EntityRepository
*/ */
public function getAllByShopAndParent(Shop $shop, $parent, $enabled = null) public function getAllByShopAndParent(Shop $shop, $parent, $enabled = null)
{ {
if ($parent === 0) {
if($parent === 0) { $query = $this->getEntityManager()->createQuery(
'
SELECT p FROM PSC\Shop\EntityBundle\Entity\Productgroup p
WHERE p.shop = :shop_id AND (p.parent = 0 OR p.parent IS NULL) AND p.enable in (:enabled) ORDER BY p.pos ASC',
)->setParameter('shop_id', $shop->getId());
} else {
$query = $this->getEntityManager() $query = $this->getEntityManager()
->createQuery(' ->createQuery(
SELECT p FROM PSCEntityBundle:Productgroup p '
WHERE p.shop = :shop_id AND (p.parent = 0 OR p.parent IS NULL) AND p.enable in (:enabled) ORDER BY p.pos ASC')->setParameter('shop_id', $shop->getId()); SELECT p FROM PSC\Shop\EntityBundle\Entity\Productgroup p
WHERE p.shop = :shop_id AND p.parent = :parent AND p.enable in (:enabled) ORDER BY p.pos ASC',
}else{ )
$query = $this->getEntityManager() ->setParameter('shop_id', $shop->getId())
->createQuery(' ->setParameter('parent', $parent);
SELECT p FROM PSCEntityBundle:Productgroup p
WHERE p.shop = :shop_id AND p.parent = :parent AND p.enable in (:enabled) ORDER BY p.pos ASC')->setParameter('shop_id', $shop->getId())->setParameter('parent', $parent);
} }
if ($enabled == null) { if ($enabled == null) {

View File

@ -42,11 +42,12 @@ class ShopContactRepository extends EntityRepository
public function myEditableShops(Contact $contact) public function myEditableShops(Contact $contact)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery(
->createQuery(' '
SELECT sc FROM PSCEntityBundle:ShopContact sc SELECT sc FROM PSC\Shop\EntityBundle\Entity\ShopContact sc
JOIN sc.shop s JOIN sc.shop s
WHERE sc.contact = :id AND sc.admin = 1 ORDER BY sc.admin ASC, s.title ASC')->setParameter('id', $contact->getId()); WHERE sc.contact = :id AND sc.admin = 1 ORDER BY sc.admin ASC, s.title ASC',
)->setParameter('id', $contact->getId());
try { try {
$result = $query->execute(); $result = $query->execute();
$tmpCollection = new ArrayCollection(); $tmpCollection = new ArrayCollection();
@ -61,11 +62,12 @@ class ShopContactRepository extends EntityRepository
public function myEditableShopsWithNoDeleted(Contact $contact) public function myEditableShopsWithNoDeleted(Contact $contact)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery(
->createQuery(' '
SELECT sc FROM PSCEntityBundle:ShopContact sc SELECT sc FROM PSC\Shop\EntityBundle\Entity\ShopContact sc
JOIN sc.shop s JOIN sc.shop s
WHERE sc.contact = :id AND s.deleted = 0 AND sc.admin = 1 ORDER BY sc.admin ASC, s.title ASC')->setParameter('id', $contact->getId()); WHERE sc.contact = :id AND s.deleted = 0 AND sc.admin = 1 ORDER BY sc.admin ASC, s.title ASC',
)->setParameter('id', $contact->getId());
try { try {
$result = $query->execute(); $result = $query->execute();
$tmpCollection = new ArrayCollection(); $tmpCollection = new ArrayCollection();
@ -82,15 +84,19 @@ class ShopContactRepository extends EntityRepository
{ {
$this->getEntityManager() $this->getEntityManager()
->createQuery(' ->createQuery('
UPDATE PSCEntityBundle:ShopContact sc UPDATE PSC\Shop\EntityBundle\Entity\ShopContact sc
SET sc.selected = 0 SET sc.selected = 0
WHERE sc.contact = :id AND sc.selected = 1')->setParameter('id', $contact->getId())->execute(); WHERE sc.contact = :id AND sc.selected = 1')
->setParameter('id', $contact->getId())
->execute();
$this->getEntityManager() $this->getEntityManager()
->createQuery(' ->createQuery('
UPDATE PSCEntityBundle:ShopContact sc UPDATE PSC\Shop\EntityBundle\Entity\ShopContact sc
SET sc.selected = 1 SET sc.selected = 1
WHERE sc.contact = :id AND sc.shop = :shop_id')->setParameter('id', $contact->getId()) WHERE sc.contact = :id AND sc.shop = :shop_id')
->setParameter('shop_id', $shop_uuid)->execute(); ->setParameter('id', $contact->getId())
->setParameter('shop_id', $shop_uuid)
->execute();
} }
public function updateAdmin($contactId, $shopId, $admin = true) public function updateAdmin($contactId, $shopId, $admin = true)
@ -102,7 +108,8 @@ class ShopContactRepository extends EntityRepository
->where('sc.contact = ?2 and sc.shop = ?3') ->where('sc.contact = ?2 and sc.shop = ?3')
->setParameter(2, $contactId) ->setParameter(2, $contactId)
->setParameter(3, $shopId) ->setParameter(3, $shopId)
->getQuery()->execute(); ->getQuery()
->execute();
} }
public function resetAdmin($contactId, $admin = true) public function resetAdmin($contactId, $admin = true)
@ -113,6 +120,7 @@ class ShopContactRepository extends EntityRepository
->setParameter(1, $admin) ->setParameter(1, $admin)
->where('sc.contact = ?2') ->where('sc.contact = ?2')
->setParameter(2, $contactId) ->setParameter(2, $contactId)
->getQuery()->execute(); ->getQuery()
->execute();
} }
} }

View File

@ -39,26 +39,27 @@ class StockbookingRepository extends EntityRepository
*/ */
public function getAllByProductId($productId, $start, $limit, $sort, $filters) public function getAllByProductId($productId, $start, $limit, $sort, $filters)
{ {
$sortTemp = ""; $sortTemp = '';
$clauses = array(); $clauses = [];
if (!empty($sort)) { if (!empty($sort)) {
$sortTemp = " ORDER BY"; $sortTemp = ' ORDER BY';
foreach ($sort as $field) { foreach ($sort as $field) {
$sortTemp .= ' s.' . $field['property'] . ' ' . $field['direction']; $sortTemp .= ' s.' . $field['property'] . ' ' . $field['direction'];
} }
} }
foreach ($filters as $filter) { foreach ($filters as $filter) {
$clauses[] = "s." . $filter['expression'] . ' ' . $filter['value']; $clauses[] = 's.' . $filter['expression'] . ' ' . $filter['value'];
} }
if (count($clauses) > 0) { if (count($clauses) > 0) {
$sortTemp = " AND " . implode(' AND ', $clauses) . $sortTemp; $sortTemp = ' AND ' . implode(' AND ', $clauses) . $sortTemp;
} }
$query = $this->getEntityManager() $query = $this->getEntityManager()
->createQuery(' ->createQuery('
SELECT s FROM PSCEntityBundle:Stockbooking s SELECT s FROM PSC\Shop\EntityBundle\Entity\Stockbooking s
WHERE s.product = :product' . $sortTemp)->setParameter('product', $productId) WHERE s.product = :product' . $sortTemp)
->setParameter('product', $productId)
->setMaxResults($limit) ->setMaxResults($limit)
->setFirstResult($start); ->setFirstResult($start);
try { try {
@ -77,10 +78,12 @@ class StockbookingRepository extends EntityRepository
*/ */
public function getCountByProductId($productId) public function getCountByProductId($productId)
{ {
$query = $this->getEntityManager() $query = $this->getEntityManager()->createQuery('
->createQuery(' SELECT s FROM PSC\Shop\EntityBundle\Entity\Stockbooking s
SELECT s FROM PSCEntityBundle:Stockbooking s WHERE s.product = :product')->setParameter(
WHERE s.product = :product')->setParameter('product', $productId); 'product',
$productId,
);
try { try {
return count($query->execute()); return count($query->execute());
} catch (\Doctrine\ORM\NoResultException $e) { } catch (\Doctrine\ORM\NoResultException $e) {

View File

@ -13,7 +13,7 @@ use PSC\Shop\MediaBundle\Model\Media as MediaModel;
use PSC\Shop\MediaBundle\Service\MediaManager as PSCMediaManager; use PSC\Shop\MediaBundle\Service\MediaManager as PSCMediaManager;
use PSC\Shop\MediaBundle\Transformer\Media as PSCMedia; use PSC\Shop\MediaBundle\Transformer\Media as PSCMedia;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;

View File

@ -15,7 +15,7 @@ use PSC\Shop\MediaBundle\Helper\Media\AbstractMediaHandler;
use PSC\Shop\MediaBundle\Helper\MediaManager; use PSC\Shop\MediaBundle\Helper\MediaManager;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
@ -92,7 +92,7 @@ class ChooserController extends AbstractController
* @return array * @return array
*/ */
#[Route(path: '/chooser/{folderId}', name: 'psc_shop_media_backend_chooser_show_folder')] #[Route(path: '/chooser/{folderId}', name: 'psc_shop_media_backend_chooser_show_folder')]
#[Template] #[Template('@PSCShopMedia/backend/chooser/choosershowfolder.html.twig')]
public function chooserShowFolderAction(Request $request, PaginatorInterface $paginator, Shop $shopService, DocumentManager $documentManager, MediaManager $mediaManager, FolderManager $folderManager, $folderId) public function chooserShowFolderAction(Request $request, PaginatorInterface $paginator, Shop $shopService, DocumentManager $documentManager, MediaManager $mediaManager, FolderManager $folderManager, $folderId)
{ {
$session = $request->getSession(); $session = $request->getSession();

View File

@ -38,8 +38,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -51,7 +51,7 @@ use Symfony\Component\HttpFoundation\Request;
class FolderController extends AbstractController class FolderController extends AbstractController
{ {
#[Route(path: '/list/folder/cke/{htmlId}/{uuid}', defaults: ['uuid' => false, 'htmlId' => false], name: 'psc_shop_media_backend_folder_cke')] #[Route(path: '/list/folder/cke/{htmlId}/{uuid}', defaults: ['uuid' => false, 'htmlId' => false], name: 'psc_shop_media_backend_folder_cke')]
#[Template] #[Template('@PSCShopMedia/backend/folder/cke.html.twig')]
public function ckeAction( public function ckeAction(
Request $request, Request $request,
\PSC\Shop\MediaBundle\Helper\MediaManager $mediaManager, \PSC\Shop\MediaBundle\Helper\MediaManager $mediaManager,
@ -240,7 +240,7 @@ class FolderController extends AbstractController
#[Route(path: '/list/folder/tw/{uuid}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_folder_tw')] #[Route(path: '/list/folder/tw/{uuid}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_folder_tw')]
#[Template] #[Template('@PSCShopMedia/backend/folder/tw.html.twig')]
public function twAction( public function twAction(
Request $request, Request $request,
\PSC\Shop\MediaBundle\Helper\MediaManager $mediaManager, \PSC\Shop\MediaBundle\Helper\MediaManager $mediaManager,
@ -437,7 +437,7 @@ class FolderController extends AbstractController
* @return array * @return array
*/ */
#[Route(path: '/list/folder/show/{uuid}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_folder_show')] #[Route(path: '/list/folder/show/{uuid}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_folder_show')]
#[Template] #[Template('@PSCShopMedia/backend/folder/show.html.twig')]
public function showAction( public function showAction(
Request $request, Request $request,
\PSC\Shop\MediaBundle\Helper\MediaManager $mediaManager, \PSC\Shop\MediaBundle\Helper\MediaManager $mediaManager,
@ -626,7 +626,7 @@ class FolderController extends AbstractController
} }
#[Route(path: '/list/folder/delete/{uuid}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_folder_delete')] #[Route(path: '/list/folder/delete/{uuid}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_folder_delete')]
#[Template] #[Template('@PSCShopMedia/backend/folder/delete.html.twig')]
public function deleteAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, DocumentManager $documentManager, $uuid, $modal, $htmlId) public function deleteAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, DocumentManager $documentManager, $uuid, $modal, $htmlId)
{ {
/** /**
@ -669,7 +669,7 @@ class FolderController extends AbstractController
* @return array * @return array
*/ */
#[Route(path: '/list/folder/create', name: 'psc_shop_media_backend_folder_sub_create')] #[Route(path: '/list/folder/create', name: 'psc_shop_media_backend_folder_sub_create')]
#[Template] #[Template('@PSCShopMedia/backend/folder/subcreate.html.twig')]
public function subCreateAction(Request $request, $folderId) public function subCreateAction(Request $request, $folderId)
{ {
} }

View File

@ -31,8 +31,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -55,7 +55,7 @@ class MediaController extends AbstractController
* @return array * @return array
*/ */
#[Route(path: '/detail/show/{uuid}/{folder}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'folder' => false, 'htmlId' => false], name: 'psc_shop_media_backend_media_detail')] #[Route(path: '/detail/show/{uuid}/{folder}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'folder' => false, 'htmlId' => false], name: 'psc_shop_media_backend_media_detail')]
#[Template] #[Template('@PSCShopMedia/backend/media/detail.html.twig')]
public function detailAction(SessionInterface $session, Request $request, DocumentManager $documentManager, MediaManager $mediaManager, EntityManagerInterface $entityManager, $uuid, $folder, $modal, $htmlId) public function detailAction(SessionInterface $session, Request $request, DocumentManager $documentManager, MediaManager $mediaManager, EntityManagerInterface $entityManager, $uuid, $folder, $modal, $htmlId)
{ {
@ -164,7 +164,7 @@ class MediaController extends AbstractController
* @throws \Doctrine\ODM\MongoDB\MongoDBException * @throws \Doctrine\ODM\MongoDB\MongoDBException
*/ */
#[Route(path: '/delete/{uuid}/{folder}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'folder' => false, 'htmlId' => false], name: 'psc_shop_media_backend_media_delete')] #[Route(path: '/delete/{uuid}/{folder}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'folder' => false, 'htmlId' => false], name: 'psc_shop_media_backend_media_delete')]
#[Template] #[Template('@PSCShopMedia/backend/media/delete.html.twig')]
public function deleteAction(Request $request, DocumentManager $documentManager, $uuid, $folder, $modal, $htmlId) public function deleteAction(Request $request, DocumentManager $documentManager, $uuid, $folder, $modal, $htmlId)
{ {
$media = $documentManager $media = $documentManager

View File

@ -33,8 +33,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -53,7 +53,7 @@ class UploadController extends AbstractController
* @return array * @return array
*/ */
#[Route(path: '/upload/create/{provider}', defaults: ['provider' => false], name: 'psc_shop_media_backend_upload_create')] #[Route(path: '/upload/create/{provider}', defaults: ['provider' => false], name: 'psc_shop_media_backend_upload_create')]
#[Template] #[Template('@PSCShopMedia/backend/upload/create.html.twig')]
public function createAction(Request $request = null, Pool $pool) public function createAction(Request $request = null, Pool $pool)
{ {
@ -83,7 +83,7 @@ class UploadController extends AbstractController
* @throws \Doctrine\ODM\MongoDB\MongoDBException * @throws \Doctrine\ODM\MongoDB\MongoDBException
*/ */
#[Route(path: '/upload/swap/{folder}/{media}/{modal}/{htmlId}', defaults: ['uuid' => false, 'uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_upload_swap')] #[Route(path: '/upload/swap/{folder}/{media}/{modal}/{htmlId}', defaults: ['uuid' => false, 'uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_upload_swap')]
#[Template] #[Template('@PSCShopMedia/backend/upload/swap.html.twig')]
public function swapAction(Request $request, SessionInterface $session, DocumentManager $documentManager, MediaManager $mediaManager, $folder, $media, CacheManager $cacheManager, $modal, $htmlId) public function swapAction(Request $request, SessionInterface $session, DocumentManager $documentManager, MediaManager $mediaManager, $folder, $media, CacheManager $cacheManager, $modal, $htmlId)
{ {
/** @var Media $media */ /** @var Media $media */
@ -128,7 +128,7 @@ class UploadController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/upload/add/{uuid}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_upload_add')] #[Route(path: '/upload/add/{uuid}/{modal}/{htmlId}', defaults: ['uuid' => false, 'modal' => false, 'htmlId' => false], name: 'psc_shop_media_backend_upload_add')]
#[Template] #[Template('@PSCShopMedia/backend/upload/add.html.twig')]
public function addAction(Request $request, Shop $shopService, SessionInterface $session, DocumentManager $documentManager, MediaManager $mediaManager, $uuid, $modal, $htmlId) public function addAction(Request $request, Shop $shopService, SessionInterface $session, DocumentManager $documentManager, MediaManager $mediaManager, $uuid, $modal, $htmlId)
{ {

View File

@ -31,8 +31,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -66,7 +66,7 @@ class EditController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/edit/create', name: 'psc_shop_news_backend_create')] #[Route(path: '/edit/create', name: 'psc_shop_news_backend_create')]
#[Template] #[Template('@PSCShopNews/backend/edit/create.html.twig')]
public function createAction(Request $request, SessionInterface $session, Field $field, EntityManagerInterface $entityManager, \PSC\System\SettingsBundle\Service\Shop $shopService) public function createAction(Request $request, SessionInterface $session, Field $field, EntityManagerInterface $entityManager, \PSC\System\SettingsBundle\Service\Shop $shopService)
{ {
$customFields = $field->getFields(\PSC\System\PluginBundle\Form\Interfaces\Field::News); $customFields = $field->getFields(\PSC\System\PluginBundle\Form\Interfaces\Field::News);
@ -108,7 +108,7 @@ class EditController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/edit/edit/{uid}', name: 'psc_shop_news_backend_edit')] #[Route(path: '/edit/edit/{uid}', name: 'psc_shop_news_backend_edit')]
#[Template] #[Template('@PSCShopNews/backend/edit/edit.html.twig')]
public function editAction(Request $request, Field $field, SessionInterface $session, EntityManagerInterface $entityManager, \PSC\System\SettingsBundle\Service\Shop $shopService, $uid) public function editAction(Request $request, Field $field, SessionInterface $session, EntityManagerInterface $entityManager, \PSC\System\SettingsBundle\Service\Shop $shopService, $uid)
{ {
$customFields = $field->getFields(\PSC\System\PluginBundle\Form\Interfaces\Field::News); $customFields = $field->getFields(\PSC\System\PluginBundle\Form\Interfaces\Field::News);
@ -154,7 +154,7 @@ class EditController extends AbstractController
* @return array|\Symfony\Component\HttpFoundation\RedirectResponse * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
*/ */
#[Route(path: '/edit/delete/{uid}', name: 'psc_shop_news_backend_delete')] #[Route(path: '/edit/delete/{uid}', name: 'psc_shop_news_backend_delete')]
#[Template] #[Template('@PSCShopNews/backend/edit/delete.html.twig')]
public function deleteAction(Request $request, SessionInterface $session, EntityManagerInterface $entityManager, \PSC\System\SettingsBundle\Service\Shop $shopService, $uid) public function deleteAction(Request $request, SessionInterface $session, EntityManagerInterface $entityManager, \PSC\System\SettingsBundle\Service\Shop $shopService, $uid)
{ {
$news = $entityManager->getRepository('PSC\Shop\NewsBundle\Entity\News')->findOneBy(['uid' => $uid]); $news = $entityManager->getRepository('PSC\Shop\NewsBundle\Entity\News')->findOneBy(['uid' => $uid]);

View File

@ -22,8 +22,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -46,7 +46,7 @@ class ListController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/list/index', name: 'psc_shop_news_backend_list')] #[Route(path: '/list/index', name: 'psc_shop_news_backend_list')]
#[Template] #[Template('@PSCShopNews/backend/list/index.html.twig')]
public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, PaginatorInterface $paginator) public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, PaginatorInterface $paginator)
{ {

View File

@ -15,7 +15,7 @@ use PSC\System\SettingsBundle\Service\Shop;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
class Create extends AbstractController class Create extends AbstractController

View File

@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class Calc extends AbstractController class Calc extends AbstractController

View File

@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class ChangeContact extends AbstractController class ChangeContact extends AbstractController

View File

@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class Copy extends AbstractController class Copy extends AbstractController

View File

@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class Create extends AbstractController class Create extends AbstractController

View File

@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class GetOneByUuid extends AbstractController class GetOneByUuid extends AbstractController

View File

@ -19,7 +19,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class Nr extends AbstractController class Nr extends AbstractController

View File

@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class GetAllByStatus extends AbstractController class GetAllByStatus extends AbstractController

View File

@ -12,7 +12,7 @@ use Symfony\Component\Routing\Annotation\Route;
use OpenApi\Annotations as OA; use OpenApi\Annotations as OA;
use Nelmio\ApiDocBundle\Annotation\Model; use Nelmio\ApiDocBundle\Annotation\Model;
use Nelmio\ApiDocBundle\Annotation\Security; use Nelmio\ApiDocBundle\Annotation\Security;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
class GetPluginListDisplay extends AbstractController class GetPluginListDisplay extends AbstractController
{ {

View File

@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class Change extends AbstractController class Change extends AbstractController

View File

@ -19,7 +19,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class ChangeAll extends AbstractController class ChangeAll extends AbstractController

View File

@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class Delete extends AbstractController class Delete extends AbstractController

View File

@ -48,7 +48,7 @@ use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
require_once __DIR__ . '/../../../EntityBundle/Lagacy/TP_Basket_Item.php'; require_once __DIR__ . '/../../../EntityBundle/Lagacy/TP_Basket_Item.php';
@ -66,7 +66,7 @@ class DetailController extends AbstractController
} }
#[Route(path: '/detail/show/{uuid}/{enableDelivery}', defaults: ['enableDelivery' => 0], name: 'psc_shop_order_backend_detail_show')] #[Route(path: '/detail/show/{uuid}/{enableDelivery}', defaults: ['enableDelivery' => 0], name: 'psc_shop_order_backend_detail_show')]
#[Template] #[Template('@PSCShopOrder/backend/detail/show.html.twig')]
public function showAction( public function showAction(
Request $request, Request $request,
Field $fieldService, Field $fieldService,
@ -351,7 +351,7 @@ class DetailController extends AbstractController
* @internal param Request $request * @internal param Request $request
*/ */
#[Route(path: '/detail/switchposstatus/{order}/{pos}/{status}', name: 'psc_shop_order_backend_detail_switchposstatus')] #[Route(path: '/detail/switchposstatus/{order}/{pos}/{status}', name: 'psc_shop_order_backend_detail_switchposstatus')]
#[Template] #[Template('@PSCShopOrder/backend/detail/switchposstatus.html.twig')]
public function switchPosStatusAction(EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $order = "", $pos = "", $status = 10) public function switchPosStatusAction(EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $order = "", $pos = "", $status = 10)
{ {
/** /**
@ -383,7 +383,7 @@ class DetailController extends AbstractController
* @return RedirectResponse * @return RedirectResponse
*/ */
#[Route(path: '/package/exported/{uuid}', name: 'psc_shop_order_backend_change_exported')] #[Route(path: '/package/exported/{uuid}', name: 'psc_shop_order_backend_change_exported')]
#[Template] #[Template('@PSCShopOrder/backend/detail/setpackageexported.html.twig')]
public function setPackageExportedAction(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "") public function setPackageExportedAction(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "")
{ {
/** /**
@ -427,7 +427,7 @@ class DetailController extends AbstractController
* @return RedirectResponse * @return RedirectResponse
*/ */
#[Route(path: '/detail/create/new/order/status/{uuid}', name: 'psc_shop_order_backend_create_new_order_status')] #[Route(path: '/detail/create/new/order/status/{uuid}', name: 'psc_shop_order_backend_create_new_order_status')]
#[Template] #[Template('@PSCShopOrder/backend/detail/createneworderstatus.html.twig')]
public function createNewOrderStatus(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "") public function createNewOrderStatus(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "")
{ {
/** /**
@ -482,7 +482,7 @@ class DetailController extends AbstractController
* @return RedirectResponse * @return RedirectResponse
*/ */
#[Route(path: '/detail/delete/{uuid}', name: 'psc_shop_order_backend_detail_delete')] #[Route(path: '/detail/delete/{uuid}', name: 'psc_shop_order_backend_detail_delete')]
#[Template] #[Template('@PSCShopOrder/backend/detail/deleteorder.html.twig')]
public function deleteOrder(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "") public function deleteOrder(DocumentManager $mongoService, EntityManagerInterface $entityManagerService, Manager $eventManagerService, Shop $shopService, $uuid = "")
{ {
/** /**

View File

@ -34,8 +34,8 @@ use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -66,9 +66,9 @@ class ListController extends AbstractController
* @return array * @return array
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Security("is_granted('ROLE_ADMIN')")] #[IsGranted('ROLE_ADMIN')]
#[Route(path: '/list/index', name: 'psc_shop_order_backend_list_index')] #[Route(path: '/list/index', name: 'psc_shop_order_backend_list_index')]
#[Template] #[Template('@PSCShopOrder/backend/list/index.html.twig')]
public function indexAction( public function indexAction(
Request $request, Request $request,
PaginatorInterface $paginator, PaginatorInterface $paginator,
@ -146,7 +146,7 @@ class ListController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/list/switchstatus/{order}/{status}', name: 'psc_shop_order_backend_list_switchstatus')] #[Route(path: '/list/switchstatus/{order}/{status}', name: 'psc_shop_order_backend_list_switchstatus')]
#[Template] #[Template('@PSCShopOrder/backend/list/switchstatus.html.twig')]
public function switchStatusAction(\PSC\System\SettingsBundle\Service\Shop $shopService, SessionInterface $session, EntityManagerInterface $emService, \PSC\Shop\QueueBundle\Service\Event\Manager $eventManagerService, $order = "", $status = 10) public function switchStatusAction(\PSC\System\SettingsBundle\Service\Shop $shopService, SessionInterface $session, EntityManagerInterface $emService, \PSC\Shop\QueueBundle\Service\Event\Manager $eventManagerService, $order = "", $status = 10)
{ {
$selectedShop = $shopService->getSelectedShop(); $selectedShop = $shopService->getSelectedShop();
@ -184,7 +184,7 @@ class ListController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/list/switchstatuspos/{position}/{status}', name: 'psc_shop_order_backend_list_switchstatus_pos')] #[Route(path: '/list/switchstatuspos/{position}/{status}', name: 'psc_shop_order_backend_list_switchstatus_pos')]
#[Template] #[Template('@PSCShopOrder/backend/list/switchstatuspos.html.twig')]
public function switchStatusPosAction(\PSC\System\SettingsBundle\Service\Shop $shopService, SessionInterface $session, EntityManagerInterface $emService, \PSC\Shop\QueueBundle\Service\Event\Manager $eventManagerService, $position = "", $status = 10) public function switchStatusPosAction(\PSC\System\SettingsBundle\Service\Shop $shopService, SessionInterface $session, EntityManagerInterface $emService, \PSC\Shop\QueueBundle\Service\Event\Manager $eventManagerService, $position = "", $status = 10)
{ {
$selectedShop = $shopService->getSelectedShop(); $selectedShop = $shopService->getSelectedShop();

View File

@ -38,8 +38,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\ResponseHeaderBag; use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use ZipArchive; use ZipArchive;
@ -107,7 +107,7 @@ class PackageController extends AbstractController
* @throws \Twig_Error_Syntax * @throws \Twig_Error_Syntax
*/ */
#[Route(path: '/detail/package/printpartner/{uuid}', name: 'psc_shop_order_backend_detail_package_printpartner')] #[Route(path: '/detail/package/printpartner/{uuid}', name: 'psc_shop_order_backend_detail_package_printpartner')]
#[Template] #[Template('@PSCShopOrder/backend/package/printpartner.html.twig')]
public function printpartnerAction(Printing $printingService, EntityManagerInterface $entityManager, $uuid = "") public function printpartnerAction(Printing $printingService, EntityManagerInterface $entityManager, $uuid = "")
{ {

View File

@ -38,8 +38,8 @@ use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
require_once(__DIR__ . '/../../../EntityBundle/Lagacy/TP_Basket_Item.php'); require_once(__DIR__ . '/../../../EntityBundle/Lagacy/TP_Basket_Item.php');
@ -47,7 +47,7 @@ require_once(__DIR__ . '/../../../EntityBundle/Lagacy/TP_Basket_Item.php');
class PrintController extends AbstractController class PrintController extends AbstractController
{ {
#[Route(path: '/detail/print/{type}/{uuid}', name: 'psc_shop_order_backend_detail_print')] #[Route(path: '/detail/print/{type}/{uuid}', name: 'psc_shop_order_backend_detail_print')]
#[Template] #[Template('@PSCShopOrder/backend/print/print.html.twig')]
public function printAction( public function printAction(
Request $request, Request $request,
Printing $printingService, Printing $printingService,
@ -90,7 +90,7 @@ class PrintController extends AbstractController
} }
#[Route(path: '/detail/printpos/{type}/{uuid}/{posuuid}', name: 'psc_shop_order_backend_detail_print_pos')] #[Route(path: '/detail/printpos/{type}/{uuid}/{posuuid}', name: 'psc_shop_order_backend_detail_print_pos')]
#[Template] #[Template('@PSCShopOrder/backend/print/printpos.html.twig')]
public function printPosAction( public function printPosAction(
Request $request, Request $request,
Printing $printingService, Printing $printingService,
@ -181,7 +181,7 @@ class PrintController extends AbstractController
} }
#[Route(path: '/detail/xrechnung/{uuid}', name: 'psc_shop_order_backend_detail_xrechnung')] #[Route(path: '/detail/xrechnung/{uuid}', name: 'psc_shop_order_backend_detail_xrechnung')]
#[Template] #[Template('@PSCShopOrder/backend/print/xrechnung.html.twig')]
public function xrechnung( public function xrechnung(
Request $request, Request $request,
Printing $printingService, Printing $printingService,

View File

@ -21,8 +21,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -45,7 +45,7 @@ class UploadController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/upload/deleteAll/{uuid}', name: 'psc_shop_order_backend_upload_deleteAll')] #[Route(path: '/upload/deleteAll/{uuid}', name: 'psc_shop_order_backend_upload_deleteAll')]
#[Template] #[Template('@PSCShopOrder/backend/upload/deleteall.html.twig')]
public function deleteAllAction( public function deleteAllAction(
Request $request, Request $request,
\PSC\System\SettingsBundle\Service\Shop $shopService, \PSC\System\SettingsBundle\Service\Shop $shopService,

View File

@ -45,5 +45,6 @@ class SpecialProductDenormalizer implements DenormalizerInterface, DenormalizerA
public function getSupportedTypes(null|string $format): array public function getSupportedTypes(null|string $format): array
{ {
return [IProductTypeObject::class];
} }
} }

View File

@ -56,8 +56,17 @@ class Order
private Address $addressService; private Address $addressService;
public function __construct(Alias $aliasService, EntityManagerInterface $em, DocumentManager $mongoManager, Shop $shopService, \PSC\Shop\OrderBundle\Transformer\Order $orderTransformer, Position $positionTransformer, Manager $eventManager, Calc $calcService, Address $addressService) public function __construct(
{ Alias $aliasService,
EntityManagerInterface $em,
DocumentManager $mongoManager,
Shop $shopService,
\PSC\Shop\OrderBundle\Transformer\Order $orderTransformer,
Position $positionTransformer,
Manager $eventManager,
Calc $calcService,
Address $addressService,
) {
$this->entityManager = $em; $this->entityManager = $em;
$this->mongoManager = $mongoManager; $this->mongoManager = $mongoManager;
$this->shopService = $shopService; $this->shopService = $shopService;
@ -74,11 +83,11 @@ class Order
$this->calcService->calcOrder($order); $this->calcService->calcOrder($order);
if ($order->getUid() != 0) { if ($order->getUid() != 0) {
$this->updateOrder($order); $this->updateOrder($order);
} elseif ($order->getUuid() != "" && $uid = $this->checkIfOrderUuidExists($order)) { } elseif ($order->getUuid() != '' && ($uid = $this->checkIfOrderUuidExists($order))) {
$order->setUid($uid); $order->setUid($uid);
$this->updateOrder($order); $this->updateOrder($order);
} else { } else {
if ($order->getAlias() != "") { if ($order->getAlias() != '') {
$result = $this->checkIfOrderExists($order); $result = $this->checkIfOrderExists($order);
if ($result === false) { if ($result === false) {
$this->newOrder($order); $this->newOrder($order);
@ -105,7 +114,10 @@ class Order
$shopRepo = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Shop::class); $shopRepo = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Shop::class);
$orderRepo = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Order::class); $orderRepo = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Order::class);
$order = $orderRepo->findOneBy(['alias' => $order->getAlias(), 'shop' => $shopRepo->findOneBy(['uuid' => $order->getShop()->uuid])]); $order = $orderRepo->findOneBy([
'alias' => $order->getAlias(),
'shop' => $shopRepo->findOneBy(['uuid' => $order->getShop()->uuid]),
]);
if ($order) { if ($order) {
return true; return true;
} }
@ -116,21 +128,24 @@ class Order
public function updateOrder(\PSC\Shop\OrderBundle\Model\Base $order) public function updateOrder(\PSC\Shop\OrderBundle\Model\Base $order)
{ {
if ($this->load_only_order) { if ($this->load_only_order) {
die("Do Not Update"); die('Do Not Update');
} }
$orderRepo = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Order::class); $orderRepo = $this->entityManager->getRepository(\PSC\Shop\EntityBundle\Entity\Order::class);
$orderDocRepo = $this->mongoManager->getRepository(\PSC\Shop\EntityBundle\Document\Order::class); $orderDocRepo = $this->mongoManager->getRepository(\PSC\Shop\EntityBundle\Document\Order::class);
/** /**
* @var \PSC\Shop\EntityBundle\Entity\Order $orderEntity * @var \PSC\Shop\EntityBundle\Entity\Order $orderEntity
*/ */
$orderEntity = $orderRepo->findOneBy(array('uuid' => (string)$order->getUuid())); $orderEntity = $orderRepo->findOneBy(['uuid' => (string) $order->getUuid()]);
$orderDoc = $orderDocRepo->findOneBy(array('uid' => (string)$orderEntity->getUID())); $orderDoc = $orderDocRepo->findOneBy(['uid' => (string) $orderEntity->getUID()]);
$this->orderTransformer->toDb($order, $orderEntity, $orderDoc); $this->orderTransformer->toDb($order, $orderEntity, $orderDoc);
if ($orderEntity->getAlias() == "" && !$order->isDraft()) { if ($orderEntity->getAlias() == '' && !$order->isDraft()) {
$orderEntity->setAlias($this->aliasService->generateAlias($orderEntity->getType(), $order->getShop()->getUuid())); $orderEntity->setAlias($this->aliasService->generateAlias(
$orderEntity->getType(),
$order->getShop()->getUuid(),
));
} }
$this->entityManager->persist($orderEntity); $this->entityManager->persist($orderEntity);
@ -146,14 +161,14 @@ class Order
foreach ($order->getPositions() as $position) { foreach ($order->getPositions() as $position) {
if ($position->getUuid()) { if ($position->getUuid()) {
/** /**
* @var Orderpos $positionEntity * @var Orderpos $positionEntity
*/ */
$positionEntity = $posRepo->findOneBy(array('uuid' => (string)$position->getUuid())); $positionEntity = $posRepo->findOneBy(['uuid' => (string) $position->getUuid()]);
} else { } else {
/** /**
* @var Orderpos $positionEntity * @var Orderpos $positionEntity
*/ */
$positionEntity = $posRepo->findOneBy(array('id' => (string)$position->getUid())); $positionEntity = $posRepo->findOneBy(['id' => (string) $position->getUid()]);
} }
$position->setPos($i); $position->setPos($i);
if (!$positionEntity) { if (!$positionEntity) {
@ -166,13 +181,11 @@ class Order
$positionDoc->setUid($positionEntity->getUid()); $positionDoc->setUid($positionEntity->getUid());
$this->mongoManager->persist($positionDoc); $this->mongoManager->persist($positionDoc);
} else { } else {
/** /**
* @var \PSC\Shop\EntityBundle\Document\Position $positionDoc * @var \PSC\Shop\EntityBundle\Document\Position $positionDoc
*/ */
$positionDoc = $posDocRepo->findOneBy(array('uid' => (string)$positionEntity->getUid())); $positionDoc = $posDocRepo->findOneBy(['uid' => (string) $positionEntity->getUid()]);
if (!$positionDoc) { if (!$positionDoc) {
$positionDoc = new \PSC\Shop\EntityBundle\Document\Position(); $positionDoc = new \PSC\Shop\EntityBundle\Document\Position();
$positionDoc->setUid($positionEntity->getUid()); $positionDoc->setUid($positionEntity->getUid());
@ -187,21 +200,20 @@ class Order
$i++; $i++;
} }
$positions = $posRepo->findBy(array('order' => $orderEntity)); $positions = $posRepo->findBy(['order' => $orderEntity]);
foreach ($positions as $position) { foreach ($positions as $position) {
if (!in_array($position->getUuid(), $positionUsed)) { if (!in_array($position->getUuid(), $positionUsed)) {
/** /**
* @var \PSC\Shop\EntityBundle\Document\Position $positionDoc * @var \PSC\Shop\EntityBundle\Document\Position $positionDoc
*/ */
$positionDoc = $posDocRepo->findOneBy(array('uid' => (string)$position->getUid())); $positionDoc = $posDocRepo->findOneBy(['uid' => (string) $position->getUid()]);
if ($positionDoc) { if ($positionDoc) {
$this->mongoManager->remove($positionDoc); $this->mongoManager->remove($positionDoc);
} }
$this->entityManager->remove($position); $this->entityManager->remove($position);
} }
} }
$this->entityManager->flush(); $this->entityManager->flush();
@ -213,8 +225,11 @@ class Order
$orderEntity = new \PSC\Shop\EntityBundle\Entity\Order(); $orderEntity = new \PSC\Shop\EntityBundle\Entity\Order();
$orderDoc = new \PSC\Shop\EntityBundle\Document\Order(); $orderDoc = new \PSC\Shop\EntityBundle\Document\Order();
$this->orderTransformer->toDb($order, $orderEntity, $orderDoc); $this->orderTransformer->toDb($order, $orderEntity, $orderDoc);
if ($orderEntity->getAlias() == "" && !$order->isDraft()) { if ($orderEntity->getAlias() == '' && !$order->isDraft()) {
$orderEntity->setAlias($this->aliasService->generateAlias($orderEntity->getType(), $order->getShop()->getUuid())); $orderEntity->setAlias($this->aliasService->generateAlias(
$orderEntity->getType(),
$order->getShop()->getUuid(),
));
} }
$this->entityManager->persist($orderEntity); $this->entityManager->persist($orderEntity);
$this->entityManager->flush(); $this->entityManager->flush();
@ -254,7 +269,7 @@ class Order
$order = $this->getOrderByUuid($uuid); $order = $this->getOrderByUuid($uuid);
$order->setUuid(Uuid::uuid7()); $order->setUuid(Uuid::uuid7());
$order->setUid(0); $order->setUid(0);
$order->setAlias(""); $order->setAlias('');
if ($typ != 0) { if ($typ != 0) {
$order->setType($typ); $order->setType($typ);
} }
@ -269,7 +284,6 @@ class Order
public function changeContact(string $uuid, string $contactUuid): PSCBase public function changeContact(string $uuid, string $contactUuid): PSCBase
{ {
$order = $this->getOrderByUuid($uuid); $order = $this->getOrderByUuid($uuid);
$order->setContact(new Contact()); $order->setContact(new Contact());
$order->getContact()->setUuid($contactUuid); $order->getContact()->setUuid($contactUuid);
@ -280,18 +294,15 @@ class Order
$this->currentOrder = null; $this->currentOrder = null;
$order = $this->getOrderByUuid($order->getUuid()); $order = $this->getOrderByUuid($order->getUuid());
return $order; return $order;
} }
public function getLastOrders(int $limit = 10): array public function getLastOrders(int $limit = 10): array
{ {
$query = $this->entityManager $query = $this->entityManager
->createQuery( ->createQuery('
' SELECT c FROM PSC\Shop\EntityBundle\Entity\Order c
SELECT c FROM PSCEntityBundle:Order c
JOIN c.shop s JOIN c.shop s
WHERE s.uid = :id ORDER BY c.created DESC' WHERE s.uid = :id ORDER BY c.created DESC')
)
->setParameter('id', $this->shopService->getSelectedShop()->getUid()) ->setParameter('id', $this->shopService->getSelectedShop()->getUid())
->setMaxResults($limit); ->setMaxResults($limit);
try { try {
@ -312,9 +323,9 @@ class Order
$orderRepo = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order'); $orderRepo = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order');
/** /**
* @var \PSC\Shop\EntityBundle\Entity\Order $orderEntity * @var \PSC\Shop\EntityBundle\Entity\Order $orderEntity
*/ */
$orderEntity = $orderRepo->findOneBy(array('uuid' => $uuid)); $orderEntity = $orderRepo->findOneBy(['uuid' => $uuid]);
if ($this->currentOrder && $this->currentOrder->getUuid() === $uuid) { if ($this->currentOrder && $this->currentOrder->getUuid() === $uuid) {
return $this->currentOrder; return $this->currentOrder;
} }
@ -329,7 +340,7 @@ class Order
{ {
$orderRepo = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order'); $orderRepo = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order');
$orderEntity = $orderRepo->findOneBy(array('uid' => $uid)); $orderEntity = $orderRepo->findOneBy(['uid' => $uid]);
return $this->parseToModel($orderEntity); return $this->parseToModel($orderEntity);
} }
@ -343,9 +354,9 @@ class Order
$orderRepo = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos'); $orderRepo = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Orderpos');
/** /**
* @var Orderpos $orderposEntity * @var Orderpos $orderposEntity
*/ */
$orderposEntity = $orderRepo->findOneBy(array('uuid' => $positionUuid)); $orderposEntity = $orderRepo->findOneBy(['uuid' => $positionUuid]);
$this->parseToModel($orderposEntity->getOrder()); $this->parseToModel($orderposEntity->getOrder());
@ -375,7 +386,6 @@ class Order
*/ */
private function parseToModel($orderEntity) private function parseToModel($orderEntity)
{ {
$this->currentOrder = new \PSC\Shop\OrderBundle\Model\Order(); $this->currentOrder = new \PSC\Shop\OrderBundle\Model\Order();
if ($orderEntity->getType() == 2) { if ($orderEntity->getType() == 2) {
$this->currentOrder = new \PSC\Shop\OrderBundle\Model\Offer(); $this->currentOrder = new \PSC\Shop\OrderBundle\Model\Offer();
@ -397,32 +407,36 @@ class Order
} }
/** /**
* @var \PSC\Shop\EntityBundle\Document\Order $orderObj * @var \PSC\Shop\EntityBundle\Document\Order $orderObj
*/ */
$orderDoc = $this->mongoManager $orderDoc = $this->mongoManager
->getRepository('PSC\Shop\EntityBundle\Document\Order') ->getRepository('PSC\Shop\EntityBundle\Document\Order')
->findOneBy(array('uid' => (string)$orderEntity->getUid())); ->findOneBy(['uid' => (string) $orderEntity->getUid()]);
if ($orderDoc) { if ($orderDoc) {
$this->orderTransformer->fromDb($this->currentOrder, $orderEntity, $orderDoc); $this->orderTransformer->fromDb($this->currentOrder, $orderEntity, $orderDoc);
} else { } else {
$this->orderTransformer->fromDb($this->currentOrder, $orderEntity, new \PSC\Shop\EntityBundle\Document\Order()); $this->orderTransformer->fromDb(
$this->currentOrder,
$orderEntity,
new \PSC\Shop\EntityBundle\Document\Order(),
);
} }
if (!$this->load_only_order) { if (!$this->load_only_order) {
$orderPos = $this->entityManager->getRepository(Orderpos::class)->findBy(['order' => $orderEntity]); $orderPos = $this->entityManager->getRepository(Orderpos::class)->findBy(['order' => $orderEntity]);
/** /**
* @var Orderpos $pos * @var Orderpos $pos
*/ */
foreach ($orderPos as $pos) { foreach ($orderPos as $pos) {
$position = new \PSC\Shop\OrderBundle\Model\Order\Position(); $position = new \PSC\Shop\OrderBundle\Model\Order\Position();
/** /**
* @var \PSC\Shop\EntityBundle\Document\Position $positionDoc * @var \PSC\Shop\EntityBundle\Document\Position $positionDoc
*/ */
$positionDoc = $this->mongoManager $positionDoc = $this->mongoManager
->getRepository('PSC\Shop\EntityBundle\Document\Position') ->getRepository('PSC\Shop\EntityBundle\Document\Position')
->findOneBy(array('uid' => (string)$pos->getUid())); ->findOneBy(['uid' => (string) $pos->getUid()]);
if ($positionDoc) { if ($positionDoc) {
$this->positionTransformer->fromDb($position, $pos, $positionDoc); $this->positionTransformer->fromDb($position, $pos, $positionDoc);
} else { } else {

View File

@ -12,7 +12,7 @@ use PSC\Shop\EntityBundle\Entity\Payment;
use PSC\Shop\PaymentBundle\Dto\All\Output; use PSC\Shop\PaymentBundle\Dto\All\Output;
use PSC\Shop\PaymentBundle\Model\Payment as PSCPayment; use PSC\Shop\PaymentBundle\Model\Payment as PSCPayment;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;

View File

@ -33,8 +33,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -71,7 +71,7 @@ class EditController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/edit/create', name: 'psc_shop_payment_backend_create')] #[Route(path: '/edit/create', name: 'psc_shop_payment_backend_create')]
#[Template] #[Template('@PSCShopPayment/backend/edit/create.html.twig')]
public function createAction(Request $request, Field $fieldService, \PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager, SessionInterface $session, DocumentManager $documentManager) public function createAction(Request $request, Field $fieldService, \PSC\System\SettingsBundle\Service\Shop $shopService, EntityManagerInterface $entityManager, SessionInterface $session, DocumentManager $documentManager)
{ {
$customFields = $fieldService->getFields(\PSC\System\PluginBundle\Form\Interfaces\Field::Shipping); $customFields = $fieldService->getFields(\PSC\System\PluginBundle\Form\Interfaces\Field::Shipping);
@ -124,7 +124,7 @@ class EditController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/edit/edit/{uid}', name: 'psc_shop_payment_backend_edit')] #[Route(path: '/edit/edit/{uid}', name: 'psc_shop_payment_backend_edit')]
#[Template] #[Template('@PSCShopPayment/backend/edit/edit.html.twig')]
public function editAction( public function editAction(
Request $request, Request $request,
Field $fieldService, Field $fieldService,
@ -204,7 +204,7 @@ class EditController extends AbstractController
* @return array|\Symfony\Component\HttpFoundation\RedirectResponse * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
*/ */
#[Route(path: '/edit/delete/{uid}', name: 'psc_shop_payment_backend_delete')] #[Route(path: '/edit/delete/{uid}', name: 'psc_shop_payment_backend_delete')]
#[Template] #[Template('@PSCShopPayment/backend/edit/delete.html.twig')]
public function deleteAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, SessionInterface $session, EntityManagerInterface $entityManager, $uid) public function deleteAction(Request $request, \PSC\System\SettingsBundle\Service\Shop $shopService, SessionInterface $session, EntityManagerInterface $entityManager, $uid)
{ {
/** @var Payment $payment */ /** @var Payment $payment */

View File

@ -27,8 +27,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -53,7 +53,7 @@ class GatewayController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/gateway/settings', name: 'psc_shop_payment_backend_gateway_settings')] #[Route(path: '/gateway/settings', name: 'psc_shop_payment_backend_gateway_settings')]
#[Template] #[Template('@PSCShopPayment/backend/gateway/settings.html.twig')]
public function settingsAction(Request $request, FormFactoryInterface $formFactory, \PSC\System\SettingsBundle\Service\Shop $shopService, Registry $registry, DocumentManager $documentManager) public function settingsAction(Request $request, FormFactoryInterface $formFactory, \PSC\System\SettingsBundle\Service\Shop $shopService, Registry $registry, DocumentManager $documentManager)
{ {

View File

@ -22,8 +22,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -46,7 +46,7 @@ class ListController extends AbstractController
* @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\ORMException
*/ */
#[Route(path: '/list/index', name: 'psc_shop_payment_backend_list')] #[Route(path: '/list/index', name: 'psc_shop_payment_backend_list')]
#[Template] #[Template('@PSCShopPayment/backend/list/index.html.twig')]
public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, PaginatorInterface $paginator) public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, PaginatorInterface $paginator)
{ {

View File

@ -27,8 +27,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -53,7 +53,7 @@ class NotifyController extends AbstractController
* @throws \Exception * @throws \Exception
*/ */
#[Route(path: '/notify/{apiKey}/{typ}', name: 'psc_shop_payment_backend_notify')] #[Route(path: '/notify/{apiKey}/{typ}', name: 'psc_shop_payment_backend_notify')]
#[Template] #[Template('@PSCShopPayment/frontend/notify/index.html.twig')]
public function indexAction(Request $request, Registry $registry, DocumentManager $documentManager, EntityManagerInterface $entityManager, $apiKey, $typ) public function indexAction(Request $request, Registry $registry, DocumentManager $documentManager, EntityManagerInterface $entityManager, $apiKey, $typ)
{ {
if ($typ == '') { if ($typ == '') {

View File

@ -27,8 +27,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**

View File

@ -17,7 +17,7 @@ use Symfony\Component\Routing\Annotation\Route;
use OpenApi\Annotations as OA; use OpenApi\Annotations as OA;
use Nelmio\ApiDocBundle\Annotation\Model; use Nelmio\ApiDocBundle\Annotation\Model;
use PSC\System\SettingsBundle\Model\Paper as PSCPaper; use PSC\System\SettingsBundle\Model\Paper as PSCPaper;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Nelmio\ApiDocBundle\Annotation\Security; use Nelmio\ApiDocBundle\Annotation\Security;
class GetAllByProductGroup extends AbstractController class GetAllByProductGroup extends AbstractController

View File

@ -15,7 +15,7 @@ use PSC\Shop\ProductBundle\Hydrate\Product as PSCProduct;
use PSC\System\SettingsBundle\Model\Paper as PSCPaper; use PSC\System\SettingsBundle\Model\Paper as PSCPaper;
use PSC\System\SettingsBundle\Model\Papercontainer; use PSC\System\SettingsBundle\Model\Papercontainer;
use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Shop;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;

View File

@ -15,7 +15,7 @@ use Symfony\Component\Routing\Annotation\Route;
use OpenApi\Annotations as OA; use OpenApi\Annotations as OA;
use Nelmio\ApiDocBundle\Annotation\Model; use Nelmio\ApiDocBundle\Annotation\Model;
use PSC\System\SettingsBundle\Model\Paper as PSCPaper; use PSC\System\SettingsBundle\Model\Paper as PSCPaper;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Nelmio\ApiDocBundle\Annotation\Security; use Nelmio\ApiDocBundle\Annotation\Security;
class One extends AbstractController class One extends AbstractController

Some files were not shown because too many files have changed in this diff Show More