diff --git a/src/new/src/PSC/Shop/AccountBundle/Controller/Backend/ListController.php b/src/new/src/PSC/Shop/AccountBundle/Controller/Backend/ListController.php
index c9f7ec7ce..81a383e0f 100755
--- a/src/new/src/PSC/Shop/AccountBundle/Controller/Backend/ListController.php
+++ b/src/new/src/PSC/Shop/AccountBundle/Controller/Backend/ListController.php
@@ -16,7 +16,7 @@ namespace PSC\Shop\AccountBundle\Controller\Backend;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use PSC\Shop\AccountBundle\Form\Backend\SearchType;
use PSC\Shop\EntityBundle\Entity\Motiv;
use PSC\System\SettingsBundle\Service\Shop;
diff --git a/src/new/src/PSC/Shop/AccountBundle/Form/Backend/SearchType.php b/src/new/src/PSC/Shop/AccountBundle/Form/Backend/SearchType.php
index 845770b06..a8fbb3cb1 100755
--- a/src/new/src/PSC/Shop/AccountBundle/Form/Backend/SearchType.php
+++ b/src/new/src/PSC/Shop/AccountBundle/Form/Backend/SearchType.php
@@ -13,8 +13,8 @@
namespace PSC\Shop\AccountBundle\Form\Backend;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use PSC\System\SettingsBundle\Service\Shop;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
diff --git a/src/new/src/PSC/Shop/CmsBundle/Controller/Backend/ListController.php b/src/new/src/PSC/Shop/CmsBundle/Controller/Backend/ListController.php
index 775916955..f6d412ea7 100755
--- a/src/new/src/PSC/Shop/CmsBundle/Controller/Backend/ListController.php
+++ b/src/new/src/PSC/Shop/CmsBundle/Controller/Backend/ListController.php
@@ -15,7 +15,7 @@ namespace PSC\Shop\CmsBundle\Controller\Backend;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use PSC\Shop\CmsBundle\Form\Backend\SearchType;
use PSC\Shop\EntityBundle\Entity\Motiv;
use PSC\Shop\ThemeBundle\Core\ThemeSource;
diff --git a/src/new/src/PSC/Shop/CmsBundle/Form/Backend/CmsType.php b/src/new/src/PSC/Shop/CmsBundle/Form/Backend/CmsType.php
index 1ad9074ae..7895b0fbf 100755
--- a/src/new/src/PSC/Shop/CmsBundle/Form/Backend/CmsType.php
+++ b/src/new/src/PSC/Shop/CmsBundle/Form/Backend/CmsType.php
@@ -15,7 +15,7 @@ namespace PSC\Shop\CmsBundle\Form\Backend;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use PSC\Libraries\AceEditorBundle\Form\Extension\AceEditorType;
use PSC\Shop\EntityBundle\Entity\Account;
use PSC\Shop\EntityBundle\Entity\Cms;
diff --git a/src/new/src/PSC/Shop/CmsBundle/Form/Backend/SearchType.php b/src/new/src/PSC/Shop/CmsBundle/Form/Backend/SearchType.php
index 26f07b5b1..a0756140e 100755
--- a/src/new/src/PSC/Shop/CmsBundle/Form/Backend/SearchType.php
+++ b/src/new/src/PSC/Shop/CmsBundle/Form/Backend/SearchType.php
@@ -13,8 +13,8 @@
namespace PSC\Shop\CmsBundle\Form\Backend;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use PSC\System\SettingsBundle\Service\Shop;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
diff --git a/src/new/src/PSC/Shop/ContactBundle/Controller/Backend/ListController.php b/src/new/src/PSC/Shop/ContactBundle/Controller/Backend/ListController.php
index e222cf268..752223332 100755
--- a/src/new/src/PSC/Shop/ContactBundle/Controller/Backend/ListController.php
+++ b/src/new/src/PSC/Shop/ContactBundle/Controller/Backend/ListController.php
@@ -15,7 +15,7 @@ namespace PSC\Shop\ContactBundle\Controller\Backend;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use PSC\Shop\ContactBundle\Form\Backend\SearchType;
use PSC\System\SettingsBundle\Service\Shop;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
diff --git a/src/new/src/PSC/Shop/ContactBundle/Form/Backend/SearchType.php b/src/new/src/PSC/Shop/ContactBundle/Form/Backend/SearchType.php
index ca0dbb719..88f8ed3de 100755
--- a/src/new/src/PSC/Shop/ContactBundle/Form/Backend/SearchType.php
+++ b/src/new/src/PSC/Shop/ContactBundle/Form/Backend/SearchType.php
@@ -13,8 +13,8 @@
namespace PSC\Shop\ContactBundle\Form\Backend;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use PSC\System\SettingsBundle\Service\Shop;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
diff --git a/src/new/src/PSC/Shop/EntityBundle/Entity/Product.php b/src/new/src/PSC/Shop/EntityBundle/Entity/Product.php
index a43e3a9a3..d02481413 100755
--- a/src/new/src/PSC/Shop/EntityBundle/Entity/Product.php
+++ b/src/new/src/PSC/Shop/EntityBundle/Entity/Product.php
@@ -164,6 +164,16 @@ class Product
return $this->pluginSettings[$name];
}
+ public $pluginsAvailable = [];
+
+ public function __isset(string $name): bool
+ {
+ if (array_search($name, $this->pluginsAvailable) !== false) {
+ return true;
+ }
+ return false;
+ }
+
public function __set(string $name, mixed $value): void
{
$this->pluginSettings[$name] = $value;
diff --git a/src/new/src/PSC/Shop/OrderBundle/Controller/Backend/ListController.php b/src/new/src/PSC/Shop/OrderBundle/Controller/Backend/ListController.php
index 5372d7d0b..26c24b1d2 100755
--- a/src/new/src/PSC/Shop/OrderBundle/Controller/Backend/ListController.php
+++ b/src/new/src/PSC/Shop/OrderBundle/Controller/Backend/ListController.php
@@ -16,7 +16,7 @@ namespace PSC\Shop\OrderBundle\Controller\Backend;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use PSC\Shop\EntityBundle\Document\Order;
use PSC\Shop\EntityBundle\Entity\Motiv;
use PSC\Shop\EntityBundle\Entity\Shop;
diff --git a/src/new/src/PSC/Shop/OrderBundle/Form/Backend/SearchType.php b/src/new/src/PSC/Shop/OrderBundle/Form/Backend/SearchType.php
index 80c65f67a..5bf86b5bd 100755
--- a/src/new/src/PSC/Shop/OrderBundle/Form/Backend/SearchType.php
+++ b/src/new/src/PSC/Shop/OrderBundle/Form/Backend/SearchType.php
@@ -13,8 +13,8 @@
namespace PSC\Shop\OrderBundle\Form\Backend;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use PSC\System\SettingsBundle\Service\Status;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
diff --git a/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/EditController.php b/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/EditController.php
index 2e47cb87d..1b9824870 100755
--- a/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/EditController.php
+++ b/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/EditController.php
@@ -25,7 +25,6 @@ use PSC\System\SettingsBundle\Service\History;
use PSC\System\SettingsBundle\Service\Log;
use PSC\System\SettingsBundle\Service\Status;
use Ramsey\Uuid\Uuid;
-use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\File\UploadedFile;
@@ -34,6 +33,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\SecurityContext;
+use Symfony\Component\Security\Http\Attribute\IsGranted;
/**
* DashboardController fürs Backend
@@ -186,23 +186,8 @@ class EditController extends AbstractController
return new JsonResponse(['success' => true, 'found' => false]);
}
- /**
- * edit
- *
- * @template()
- *
- * @param Request $request Request
- * @param Field $fieldService
- * @param EntityManagerInterface $entityManager
- * @param \PSC\System\SettingsBundle\Service\Shop $shopService
- * @param DocumentManager $documentManager
- * @param SessionInterface $session
- * @param $type
- * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
- * @throws \Doctrine\ODM\MongoDB\MongoDBException
- * @throws \Doctrine\ORM\ORMException
- */
#[Route(path: '/edit/create/{type}', name: 'backend_production_product_create')]
+ #[Template('@PSCShopProduct/backend/product/edit/create.html.twig')]
public function createAction(
Request $request,
Field $fieldService,
@@ -231,6 +216,10 @@ class EditController extends AbstractController
->getRepository('PSC\Shop\EntityBundle\Entity\Productgroup')
->findBy(['parent' => 0, 'shop' => $selectedShop]);
+ $customProductFormFields = $fieldService->getFields(
+ \PSC\System\PluginBundle\Form\Interfaces\Field::Product,
+ $type,
+ );
$customProductFields = $fieldService->getProductFields(
\PSC\System\PluginBundle\Form\Interfaces\Field::Product,
$type,
@@ -246,6 +235,12 @@ class EditController extends AbstractController
$domains = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Domain')->getAllByShopId($selectedShop);
$product = new Product();
+ foreach ($customProductFields as $field) {
+ $product->pluginsAvailable[] = $field->getGroup();
+ }
+ foreach ($customProductFormFields as $field) {
+ $product->pluginsAvailable[] = $field->getGroup();
+ }
$product->setShop($selectedShop);
$product->setInstall($selectedShop->getInstall()->getUid());
$product->setType($type);
@@ -335,27 +330,8 @@ class EditController extends AbstractController
];
}
- /**
- * edit
- *
- * @template()
- *
- * @param Request $request Request
- * @param Field $fieldService
- * @param EntityManagerInterface $entityManager
- * @param DocumentManager $documentManager
- * @param PaginatorInterface $paginator
- * @param SessionInterface $session
- * @param \PSC\System\SettingsBundle\Service\Shop $shopService
- * @param Status $statusService
- * @param \PSC\Shop\OrderBundle\Service\Order $orderService
- * @param string $uuid Uuid
- *
- * @return array
- * @throws \Doctrine\ODM\MongoDB\MongoDBException
- * @throws \Doctrine\ORM\ORMException
- */
#[Route(path: '/edit/index/{uuid}', name: 'backend_production_product_edit')]
+ #[Template('@PSCShopProduct/backend/product/edit/edit.html.twig')]
public function editAction(
Request $request,
Field $fieldService,
@@ -405,6 +381,10 @@ class EditController extends AbstractController
->getRepository('PSC\Shop\EntityBundle\Entity\Productgroup')
->findBy(['parent' => 0, 'shop' => $selectedShop]);
+ $customProductFormFields = $fieldService->getFields(
+ \PSC\System\PluginBundle\Form\Interfaces\Field::Product,
+ $product->getType(),
+ );
$customProductFields = $fieldService->getProductFields(
\PSC\System\PluginBundle\Form\Interfaces\Field::Product,
$product->getType(),
@@ -420,6 +400,12 @@ class EditController extends AbstractController
);
$product->setUpdatedAt(new \DateTime());
+ foreach ($customProductFields as $field) {
+ $product->pluginsAvailable[] = $field->getGroup();
+ }
+ foreach ($customProductFormFields as $field) {
+ $product->pluginsAvailable[] = $field->getGroup();
+ }
if (!$request->isMethod('POST') && $productDoc) {
$product->setAnsprechPartner($productDoc->getAnsprechPartner());
diff --git a/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/ListController.php b/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/ListController.php
index 245eddc63..235ce47a7 100755
--- a/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/ListController.php
+++ b/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/ListController.php
@@ -15,7 +15,7 @@ namespace PSC\Shop\ProductBundle\Controller\Backend\Product;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use PSC\Shop\EntityBundle\Entity\Motiv;
use PSC\Shop\EntityBundle\Entity\Product;
use PSC\Shop\NewsBundle\Form\Backend\DeleteType;
diff --git a/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/PermissionController.php b/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/PermissionController.php
index 87b953f1b..7b90b603b 100755
--- a/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/PermissionController.php
+++ b/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Product/PermissionController.php
@@ -25,13 +25,13 @@ use PSC\Shop\ProductBundle\PSCShopProductBundle;
use PSC\System\SettingsBundle\Document\LogEntry;
use PSC\System\SettingsBundle\Service\Log;
use PSC\System\SettingsBundle\Service\Shop;
+use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse;
-use Symfony\Component\Routing\Annotation\Route;
-use Symfony\Bridge\Twig\Attribute\Template;
-use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\Routing\Attribute\Route;
+use Symfony\Component\Security\Http\Attribute\IsGranted;
/**
* StockController fürs Backend
@@ -45,43 +45,44 @@ class PermissionController extends AbstractController
* @var Log
*/
private Log $logService;
+
public function __construct(Log $logService)
{
$this->logService = $logService;
}
- /**
- * add
- *
- * @template()
- *
- * @param Request $request Request
- * @param Shop $shopService
- * @param EntityManagerInterface $entityManager
- * @param PaginatorInterface $paginator
- * @param string $product Uuid
- *
- * @return array|View
- * @throws \Doctrine\ORM\ORMException
- */
- #[Route(path: '/permission/index/{product}', name: 'backend_production_product_permission_index')]
- public function indexAction(Request $request, Shop $shopService, EntityManagerInterface $entityManager, PaginatorInterface $paginator, string $product)
- {
+ #[Route(path: '/permission/index/{uuid}', name: 'backend_production_product_permission_index')]
+ #[Template('@PSCShopProduct/backend/product/permission/index.html.twig')]
+ public function indexAction(
+ Request $request,
+ Shop $shopService,
+ EntityManagerInterface $entityManager,
+ PaginatorInterface $paginator,
+ string $uuid,
+ ) {
$selectedShop = $shopService->getSelectedShop();
/** @var Product $product */
$product = $entityManager
- ->getRepository('PSC\Shop\EntityBundle\Entity\Product')->findOneBy(array('uuid' => $product, 'shop' => $selectedShop));
+ ->getRepository('PSC\Shop\EntityBundle\Entity\Product')
+ ->findOneBy(['uuid' => $uuid, 'shop' => $selectedShop]);
$form = $this->createForm(PermissionType::class, $product);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($product);
$entityManager->flush();
- $this->logService->createLogEntry($selectedShop, $this->getUser(), LogEntry::INFO, PSCShopProductBundle::class, $product->getTitle(), "Product Permission set");
+ $this->logService->createLogEntry(
+ $selectedShop,
+ $this->getUser(),
+ LogEntry::INFO,
+ PSCShopProductBundle::class,
+ $product->getTitle(),
+ 'Product Permission set',
+ );
}
- return array(
+ return [
'form' => $form->createView(),
'product' => $product,
- );
+ ];
}
}
diff --git a/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Productgroup/ListController.php b/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Productgroup/ListController.php
index ff83b2f26..544b490ec 100755
--- a/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Productgroup/ListController.php
+++ b/src/new/src/PSC/Shop/ProductBundle/Controller/Backend/Productgroup/ListController.php
@@ -15,7 +15,7 @@ namespace PSC\Shop\ProductBundle\Controller\Backend\Productgroup;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use PSC\Shop\EntityBundle\Entity\Motiv;
use PSC\Shop\ProductBundle\Form\Backend\Productgroup\SearchType;
use PSC\Shop\ProductBundle\Form\Backend\ProductSearchType;
diff --git a/src/new/src/PSC/Shop/ProductBundle/Form/Backend/Product/ProductType.php b/src/new/src/PSC/Shop/ProductBundle/Form/Backend/Product/ProductType.php
index a5542fed5..6b0c68fb5 100755
--- a/src/new/src/PSC/Shop/ProductBundle/Form/Backend/Product/ProductType.php
+++ b/src/new/src/PSC/Shop/ProductBundle/Form/Backend/Product/ProductType.php
@@ -406,6 +406,24 @@ class ProductType extends AbstractType
$field->formPreSubmit($event);
}
});
+
+ $builder->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) use ($options) {
+ /**
+ * @var \PSC\System\PluginBundle\Form\Interfaces\Field $field
+ */
+ foreach ($this->fields->getFields(\PSC\System\PluginBundle\Form\Interfaces\Field::Product) as $field) {
+ $field->formSubmit($event);
+ }
+ /**
+ * @var \PSC\System\PluginBundle\Form\Interfaces\Field $field
+ */
+ foreach ($this->fields->getProductFields(
+ \PSC\System\PluginBundle\Form\Interfaces\Field::Product,
+ $options['productType'],
+ ) as $field) {
+ $field->formSubmit($event);
+ }
+ });
}
public function getName()
diff --git a/src/new/src/PSC/Shop/ProductBundle/Form/Backend/ProductSearchType.php b/src/new/src/PSC/Shop/ProductBundle/Form/Backend/ProductSearchType.php
index 5b091bcce..d2612a744 100755
--- a/src/new/src/PSC/Shop/ProductBundle/Form/Backend/ProductSearchType.php
+++ b/src/new/src/PSC/Shop/ProductBundle/Form/Backend/ProductSearchType.php
@@ -14,9 +14,9 @@
namespace PSC\Shop\ProductBundle\Form\Backend;
use Doctrine\ORM\EntityRepository;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\EntityFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\EntityFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use PSC\Shop\EntityBundle\Entity\Productgroup;
use PSC\System\SettingsBundle\Service\Shop;
use Symfony\Component\Form\AbstractType;
diff --git a/src/new/src/PSC/Shop/ProductBundle/Form/Backend/Productgroup/SearchType.php b/src/new/src/PSC/Shop/ProductBundle/Form/Backend/Productgroup/SearchType.php
index 48374d607..341cd9a04 100755
--- a/src/new/src/PSC/Shop/ProductBundle/Form/Backend/Productgroup/SearchType.php
+++ b/src/new/src/PSC/Shop/ProductBundle/Form/Backend/Productgroup/SearchType.php
@@ -3,8 +3,8 @@
namespace PSC\Shop\ProductBundle\Form\Backend\Productgroup;
use Doctrine\ORM\EntityRepository;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use PSC\Shop\EntityBundle\Entity\Productgroup;
use PSC\System\SettingsBundle\Service\Shop;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
diff --git a/src/new/src/PSC/Shop/ProductBundle/Resources/views/backend/product/edit/edit.html.twig b/src/new/src/PSC/Shop/ProductBundle/Resources/views/backend/product/edit/edit.html.twig
index 8043ef5ce..d3504f41d 100755
--- a/src/new/src/PSC/Shop/ProductBundle/Resources/views/backend/product/edit/edit.html.twig
+++ b/src/new/src/PSC/Shop/ProductBundle/Resources/views/backend/product/edit/edit.html.twig
@@ -11,7 +11,7 @@ a[href^="#formlayouter"] {display:none;}
{{ 'Product'|trans }} >
{{ 'edit'|trans }}
- {{ 'show'|trans }}
+ {{ 'show'|trans }}
@@ -22,9 +22,9 @@ a[href^="#formlayouter"] {display:none;}
diff --git a/src/new/src/PSC/System/PluginBundle/Form/Interfaces/Field.php b/src/new/src/PSC/System/PluginBundle/Form/Interfaces/Field.php
index 2522e1578..a577f648a 100755
--- a/src/new/src/PSC/System/PluginBundle/Form/Interfaces/Field.php
+++ b/src/new/src/PSC/System/PluginBundle/Form/Interfaces/Field.php
@@ -35,11 +35,20 @@ interface Field
const GroupGeneral = 'general';
public function formPreSubmit(FormEvent $event);
+
public function formPostSubmit(FormEvent $event);
+
public function formPostSetData(FormEvent $event);
+
public function formPreSetData(FormEvent $event);
+
+ public function formSubmit(FormEvent $event);
+
public function getModule();
+
public function getGroup();
+
public function getTemplate();
+
public function buildForm(FormBuilderInterface $builder, array $options);
}
diff --git a/src/new/src/PSC/System/SettingsBundle/Controller/Backend/LogController.php b/src/new/src/PSC/System/SettingsBundle/Controller/Backend/LogController.php
index 03f388225..1f1ba802b 100755
--- a/src/new/src/PSC/System/SettingsBundle/Controller/Backend/LogController.php
+++ b/src/new/src/PSC/System/SettingsBundle/Controller/Backend/LogController.php
@@ -13,7 +13,7 @@ use Doctrine\Bundle\MongoDBBundle\ManagerRegistry;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use PhpParser\Comment\Doc;
use PSC\Shop\EntityBundle\Entity\Paper;
use PSC\Shop\EntityBundle\Entity\Shop;
diff --git a/src/new/src/PSC/System/SettingsBundle/Controller/Backend/PaperController.php b/src/new/src/PSC/System/SettingsBundle/Controller/Backend/PaperController.php
index 78c0255cf..5fc9a502e 100755
--- a/src/new/src/PSC/System/SettingsBundle/Controller/Backend/PaperController.php
+++ b/src/new/src/PSC/System/SettingsBundle/Controller/Backend/PaperController.php
@@ -13,7 +13,7 @@ use Doctrine\Bundle\MongoDBBundle\ManagerRegistry;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use PhpParser\Comment\Doc;
use PSC\Shop\EntityBundle\Entity\Paper;
use PSC\Shop\EntityBundle\Entity\Shop;
diff --git a/src/new/src/PSC/System/SettingsBundle/Form/Backend/SearchType.php b/src/new/src/PSC/System/SettingsBundle/Form/Backend/SearchType.php
index a90aeffdc..b08dbe7ea 100755
--- a/src/new/src/PSC/System/SettingsBundle/Form/Backend/SearchType.php
+++ b/src/new/src/PSC/System/SettingsBundle/Form/Backend/SearchType.php
@@ -13,8 +13,8 @@
namespace PSC\System\SettingsBundle\Form\Backend;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\RequestStack;
diff --git a/src/new/var/plugins/Custom/Albertbauer/PaginaNetABSa/form/field/CalcnumberText.php b/src/new/var/plugins/Custom/Albertbauer/PaginaNetABSa/form/field/CalcnumberText.php
index bc7ebcb5b..553e8c637 100755
--- a/src/new/var/plugins/Custom/Albertbauer/PaginaNetABSa/form/field/CalcnumberText.php
+++ b/src/new/var/plugins/Custom/Albertbauer/PaginaNetABSa/form/field/CalcnumberText.php
@@ -59,4 +59,8 @@ class CalcnumberText implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/Custom/Albertbauer/PaginaNetABSa/form/field/ShopSettings.php b/src/new/var/plugins/Custom/Albertbauer/PaginaNetABSa/form/field/ShopSettings.php
index c58af1326..19bdfe8de 100755
--- a/src/new/var/plugins/Custom/Albertbauer/PaginaNetABSa/form/field/ShopSettings.php
+++ b/src/new/var/plugins/Custom/Albertbauer/PaginaNetABSa/form/field/ShopSettings.php
@@ -86,4 +86,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/CollectLayouter/Form/BackendFields.php b/src/new/var/plugins/Custom/PSC/CollectLayouter/Form/BackendFields.php
index 62ca8de88..27ae6667b 100755
--- a/src/new/var/plugins/Custom/PSC/CollectLayouter/Form/BackendFields.php
+++ b/src/new/var/plugins/Custom/PSC/CollectLayouter/Form/BackendFields.php
@@ -16,11 +16,13 @@ use Symfony\Component\Form\FormEvent;
#[AutoconfigureTag('psc.backend.custom.fields')]
class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
{
- protected $tab = "uploads";
+ protected $tab = 'uploads';
- public function __construct(private Status $statusService, private Shop $shopService, private EntityManagerInterface $entityManager)
- {
- }
+ public function __construct(
+ private Status $statusService,
+ private Shop $shopService,
+ private EntityManagerInterface $entityManager,
+ ) {}
public function getTemplate()
{
@@ -37,64 +39,63 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
*/
public function formPreSubmit(FormEvent $event)
{
-
-
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
-
- $results = $this->entityManager->getRepository(Account::class)->createQueryBuilder('a')
+ $results = $this->entityManager
+ ->getRepository(Account::class)
+ ->createQueryBuilder('a')
->join('a.shops', 's')
- ->where('s.uid = :shop')->setParameter('shop', $this->shopService->getSelectedShop()->getId())->getQuery()->execute();
+ ->where('s.uid = :shop')
+ ->setParameter('shop', $this->shopService->getSelectedShop()->getId())
+ ->getQuery()
+ ->execute();
$accounts = [];
/** @var Account $result */
- foreach($results as $result) {
+ foreach ($results as $result) {
$accounts[$result->getTitle()] = $result->getId();
}
$builder
->add('uploadCollectLayouter', CheckboxType::class, ['required' => false, 'label' => 'Aktivieren'])
- ->add("uploadCollectLayouterOrdersInitalStatus", ChoiceType::class, array(
+ ->add('uploadCollectLayouterOrdersInitalStatus', ChoiceType::class, [
'label' => 'Initalstatus',
'choices' => $this->statusService->getPositionStatusAsArray(),
- 'translation_domain' => 'posstatus'
- ))
+ 'translation_domain' => 'posstatus',
+ ])
->add('uploadCollectLayouterDownload', CheckboxType::class, ['required' => false, 'label' => 'Download'])
-
-
->add('uploadCollectLayouterSek', CheckboxType::class, ['required' => false, 'label' => 'Aktivieren'])
- ->add("uploadCollectLayouterOrdersInitalStatusSek", ChoiceType::class, array(
+ ->add('uploadCollectLayouterOrdersInitalStatusSek', ChoiceType::class, [
'label' => 'Initalstatus',
'choices' => $this->statusService->getPositionStatusAsArray(),
- 'translation_domain' => 'posstatus'
- ))
- ->add('uploadCollectLayouterAccountFilter', ChoiceType::class, array(
- 'choices' => array(
+ 'translation_domain' => 'posstatus',
+ ])
+ ->add('uploadCollectLayouterAccountFilter', ChoiceType::class, [
+ 'choices' => [
'Alle nicht gesperrten' => 1,
'Gleich der angemeldeten Firma' => 2,
'Filter nach gewählter Firma' => 3,
'Filter nach gewählter Firma + alle Personen aller Firmen die dieser Firma zugordnet sind' => 4,
'Gleich der angemeldeten Firma + alle Personen aller Firmen die meiner Firma zugordnet sind' => 5,
- ),
- 'label' => 'Firmenfilter'
- ))
-
- ->add('uploadCollectLayouterOrdersAccount', ChoiceType::class, array(
+ ],
+ 'label' => 'Firmenfilter',
+ ])
+ ->add('uploadCollectLayouterOrdersAccount', ChoiceType::class, [
'multiple' => false,
'expanded' => false,
'required' => false,
'label' => 'Gewählte Firma',
- 'choices' => $accounts
- ));
+ 'choices' => $accounts,
+ ]);
return $builder;
}
public function getGroup()
{
- return "collectlayouter";
+ return 'collectlayouter';
}
public function formPostSetData(FormEvent $event)
@@ -104,10 +105,14 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
public function formPostSubmit(FormEvent $event)
{
- }
+ }
public function formPreSetData(FormEvent $event)
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/CreativeLayouter/Controller/Backend/ListController.php b/src/new/var/plugins/Custom/PSC/CreativeLayouter/Controller/Backend/ListController.php
index e2d4f4c01..0afd090b7 100644
--- a/src/new/var/plugins/Custom/PSC/CreativeLayouter/Controller/Backend/ListController.php
+++ b/src/new/var/plugins/Custom/PSC/CreativeLayouter/Controller/Backend/ListController.php
@@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping\Entity;
use Gaufrette\FilesystemMapInterface;
use Knp\Bundle\GaufretteBundle\FilesystemMap;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use PSC\Shop\EntityBundle\Entity\Motiv;
use PSC\Shop\MotivBundle\Form\Backend\MotivType;
use PSC\Shop\MotivBundle\Form\Backend\SearchType;
diff --git a/src/new/var/plugins/Custom/PSC/CreativeLayouter/Form/Backend/SearchType.php b/src/new/var/plugins/Custom/PSC/CreativeLayouter/Form/Backend/SearchType.php
index 2a3a2a1ac..fc79c4fb7 100644
--- a/src/new/var/plugins/Custom/PSC/CreativeLayouter/Form/Backend/SearchType.php
+++ b/src/new/var/plugins/Custom/PSC/CreativeLayouter/Form/Backend/SearchType.php
@@ -2,8 +2,8 @@
namespace Plugin\Custom\PSC\CreativeLayouter\Form\Backend;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\FormBuilderInterface;
diff --git a/src/new/var/plugins/Custom/PSC/CreativeLayouter/Form/BackendFields.php b/src/new/var/plugins/Custom/PSC/CreativeLayouter/Form/BackendFields.php
index bc70feead..a78df6d51 100644
--- a/src/new/var/plugins/Custom/PSC/CreativeLayouter/Form/BackendFields.php
+++ b/src/new/var/plugins/Custom/PSC/CreativeLayouter/Form/BackendFields.php
@@ -91,4 +91,8 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/FacebookProduktXMLExport/Form/Field/FacebookProductExporter.php b/src/new/var/plugins/Custom/PSC/FacebookProduktXMLExport/Form/Field/FacebookProductExporter.php
index e43c053db..eca7da9bb 100755
--- a/src/new/var/plugins/Custom/PSC/FacebookProduktXMLExport/Form/Field/FacebookProductExporter.php
+++ b/src/new/var/plugins/Custom/PSC/FacebookProduktXMLExport/Form/Field/FacebookProductExporter.php
@@ -98,5 +98,9 @@ class FacebookProductExporter implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/FacebookProduktXMLExport/Form/Field/ShopSettings.php b/src/new/var/plugins/Custom/PSC/FacebookProduktXMLExport/Form/Field/ShopSettings.php
index e89848a92..91cc16fd3 100755
--- a/src/new/var/plugins/Custom/PSC/FacebookProduktXMLExport/Form/Field/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/FacebookProduktXMLExport/Form/Field/ShopSettings.php
@@ -118,4 +118,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/FormLayouter/Form/Field/BackendFields.php b/src/new/var/plugins/Custom/PSC/FormLayouter/Form/Field/BackendFields.php
index 56860c083..ca9486b5b 100644
--- a/src/new/var/plugins/Custom/PSC/FormLayouter/Form/Field/BackendFields.php
+++ b/src/new/var/plugins/Custom/PSC/FormLayouter/Form/Field/BackendFields.php
@@ -74,4 +74,8 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Fiel
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/Custom/PSC/FormLayouter/Form/Field/EnableEditor.php b/src/new/var/plugins/Custom/PSC/FormLayouter/Form/Field/EnableEditor.php
index bab2de6ec..f26729f7f 100644
--- a/src/new/var/plugins/Custom/PSC/FormLayouter/Form/Field/EnableEditor.php
+++ b/src/new/var/plugins/Custom/PSC/FormLayouter/Form/Field/EnableEditor.php
@@ -134,4 +134,8 @@ class EnableEditor implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/Custom/PSC/GoogleProduktXMLExport/Form/ProductSettings.php b/src/new/var/plugins/Custom/PSC/GoogleProduktXMLExport/Form/ProductSettings.php
index 5e69cae41..aabe9955d 100755
--- a/src/new/var/plugins/Custom/PSC/GoogleProduktXMLExport/Form/ProductSettings.php
+++ b/src/new/var/plugins/Custom/PSC/GoogleProduktXMLExport/Form/ProductSettings.php
@@ -86,5 +86,9 @@ class ProductSettings implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/GoogleProduktXMLExport/Form/ShopSettings.php b/src/new/var/plugins/Custom/PSC/GoogleProduktXMLExport/Form/ShopSettings.php
index 7e5f67f9a..6563034df 100755
--- a/src/new/var/plugins/Custom/PSC/GoogleProduktXMLExport/Form/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/GoogleProduktXMLExport/Form/ShopSettings.php
@@ -105,4 +105,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/HPLayouter/Form/Field/EnableCheckbox.php b/src/new/var/plugins/Custom/PSC/HPLayouter/Form/Field/EnableCheckbox.php
index 24490d0aa..68b89033e 100644
--- a/src/new/var/plugins/Custom/PSC/HPLayouter/Form/Field/EnableCheckbox.php
+++ b/src/new/var/plugins/Custom/PSC/HPLayouter/Form/Field/EnableCheckbox.php
@@ -60,5 +60,9 @@ class EnableCheckbox implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/Pitchprint/Form/BackendFields.php b/src/new/var/plugins/Custom/PSC/Pitchprint/Form/BackendFields.php
index 7d81dd133..7c9a82e11 100755
--- a/src/new/var/plugins/Custom/PSC/Pitchprint/Form/BackendFields.php
+++ b/src/new/var/plugins/Custom/PSC/Pitchprint/Form/BackendFields.php
@@ -100,4 +100,8 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/Pitchprint/Form/Field/ShopSettings.php b/src/new/var/plugins/Custom/PSC/Pitchprint/Form/Field/ShopSettings.php
index f2ee42ad6..5deba0497 100755
--- a/src/new/var/plugins/Custom/PSC/Pitchprint/Form/Field/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/Pitchprint/Form/Field/ShopSettings.php
@@ -72,4 +72,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/Printess/Controller/Frontend/DesignerController.php b/src/new/var/plugins/Custom/PSC/Printess/Controller/Frontend/DesignerController.php
index ddff28137..f04c397f9 100755
--- a/src/new/var/plugins/Custom/PSC/Printess/Controller/Frontend/DesignerController.php
+++ b/src/new/var/plugins/Custom/PSC/Printess/Controller/Frontend/DesignerController.php
@@ -1,31 +1,36 @@
getUser() !== null) {
-
+ if ($this->getUser() !== null) {
$contact = new Contact();
$contactTransformer->fromDb($contact, $this->getUser());
@@ -35,45 +40,49 @@ class DesignerController extends AbstractController
/** @var \Plugin\Custom\PSC\Pitchprint\Controller\Frontend\Product $product */
$product = $entityManager
->getRepository('PSC\Shop\EntityBundle\Entity\Product')
- ->findOneBy(array('uuid' => $productId));
-
+ ->findOneBy(['uuid' => $productId]);
/** @var \PSC\Shop\EntityBundle\Document\Product $productDoc */
$productDoc = $documentManager
->getRepository('PSC\Shop\EntityBundle\Document\Product')
- ->findOneBy(array('uid' => (string)$product->getUid()));
+ ->findOneBy(['uid' => (string) $product->getUid()]);
return [
'shopDoc' => $shopService->getMongoShopByDomain(),
'product' => $product,
'productDoc' => $productDoc,
- 'data' => $data
+ 'data' => $data,
];
-
}
- #[Template()]
+ #[Template('@PluginCustomPSCPrintess/frontend/designer/load.html.twig')]
#[Route('/load/{productId}/{layouterId}', name: 'plugin_custom_psc_printess_load')]
- public function loadAction(Shop $shopService,EntityManagerInterface $entityManager, DocumentManager $documentManager, \PSC\Shop\ContactBundle\Transformer\Model\Contact $contactTransformer, ContactArray $contactArray, string $productId, string $layouterId)
- {
+ public function loadAction(
+ Shop $shopService,
+ EntityManagerInterface $entityManager,
+ DocumentManager $documentManager,
+ \PSC\Shop\ContactBundle\Transformer\Model\Contact $contactTransformer,
+ ContactArray $contactArray,
+ string $productId,
+ string $layouterId,
+ ) {
/** @var \Plugin\Custom\PSC\Pitchprint\Controller\Frontend\Product $product */
$product = $entityManager
->getRepository('PSC\Shop\EntityBundle\Entity\Product')
- ->findOneBy(array('uuid' => $productId));
-
+ ->findOneBy(['uuid' => $productId]);
/** @var \PSC\Shop\EntityBundle\Document\Product $productDoc */
$productDoc = $documentManager
->getRepository('PSC\Shop\EntityBundle\Document\Product')
- ->findOneBy(array('uid' => (string)$product->getUid()));
+ ->findOneBy(['uid' => (string) $product->getUid()]);
$layoutDesignData = $entityManager
- ->getRepository('PSC\Shop\EntityBundle\Entity\Layoutdesigndata')->findOneBy(array('uuid' => $layouterId));
+ ->getRepository('PSC\Shop\EntityBundle\Entity\Layoutdesigndata')
+ ->findOneBy(['uuid' => $layouterId]);
$data = [];
- if($this->getUser() !== null) {
-
+ if ($this->getUser() !== null) {
$contact = new Contact();
$contactTransformer->fromDb($contact, $this->getUser());
@@ -86,19 +95,17 @@ class DesignerController extends AbstractController
'productDoc' => $productDoc,
'layouterId' => $layouterId,
'projectId' => $layoutDesignData->getDesign()['projectId'],
- 'data' => $data
+ 'data' => $data,
];
-
}
#[Route('/save', name: 'plugin_custom_psc_printess_save')]
public function saveAction(Request $request, EntityManagerInterface $entityManager)
{
-
- $uuid = $request->get("layouter");
- $articleUuid = $request->get("article");
- $projectId = $request->get("projectId");
- $previews = $request->get("previews");
+ $uuid = $request->get('layouter');
+ $articleUuid = $request->get('article');
+ $projectId = $request->get('projectId');
+ $previews = $request->get('previews');
$layoutDesignData = new Layoutdesigndata();
$layoutDesignData->setUuid($uuid);
@@ -109,7 +116,7 @@ class DesignerController extends AbstractController
$entityManager->flush();
$json = new JsonResponse();
- $json->setContent(json_encode(array('success' => true)));
+ $json->setContent(json_encode(['success' => true]));
return $json;
}
@@ -117,13 +124,13 @@ class DesignerController extends AbstractController
#[Route('/update', name: 'plugin_custom_psc_printess_update')]
public function updateAction(Request $request, EntityManagerInterface $entityManager)
{
-
- $uuid = $request->get("layouter");
- $projectId = $request->get("projectId");
- $previews = $request->get("previews");
+ $uuid = $request->get('layouter');
+ $projectId = $request->get('projectId');
+ $previews = $request->get('previews');
$layoutDesignData = $entityManager
- ->getRepository('PSC\Shop\EntityBundle\Entity\Layoutdesigndata')->findOneBy(array('uuid' => $uuid));
+ ->getRepository('PSC\Shop\EntityBundle\Entity\Layoutdesigndata')
+ ->findOneBy(['uuid' => $uuid]);
$layoutDesignData->setDesign(['projectId' => $projectId, 'previews' => $previews]);
@@ -131,8 +138,9 @@ class DesignerController extends AbstractController
$entityManager->flush();
$json = new JsonResponse();
- $json->setContent(json_encode(array('success' => true)));
+ $json->setContent(json_encode(['success' => true]));
return $json;
}
-}
\ No newline at end of file
+}
+
diff --git a/src/new/var/plugins/Custom/PSC/Printess/Form/BackendFields.php b/src/new/var/plugins/Custom/PSC/Printess/Form/BackendFields.php
index 171a3deb9..49a00189a 100755
--- a/src/new/var/plugins/Custom/PSC/Printess/Form/BackendFields.php
+++ b/src/new/var/plugins/Custom/PSC/Printess/Form/BackendFields.php
@@ -23,7 +23,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
{
- protected $tab = "uploads";
+ protected $tab = 'uploads';
private $statusService;
/**
@@ -57,63 +57,80 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
*/
public function formPreSubmit(FormEvent $event)
{
-
-
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
-
- $results = $this->entityManager->getRepository(Account::class)->createQueryBuilder('a')
+ $results = $this->entityManager
+ ->getRepository(Account::class)
+ ->createQueryBuilder('a')
->join('a.shops', 's')
- ->where('s.uid = :shop')->setParameter('shop', $this->shopService->getSelectedShop()->getId())->getQuery()->execute();
+ ->where('s.uid = :shop')
+ ->setParameter('shop', $this->shopService->getSelectedShop()->getId())
+ ->getQuery()
+ ->execute();
$accounts = [];
/** @var Account $result */
- foreach($results as $result) {
+ foreach ($results as $result) {
$accounts[$result->getTitle()] = $result->getId();
}
/** @var Product $product */
$product = $options['product'];
- $builder->add('uploadCollectingOrders', CheckboxType::class, ['required' => false, 'label' => 'Aktivieren'])
- ->add('collectingOrdersChangePicture', CheckboxType::class, ['required' => false, 'label' => 'Bild tauschen aktivieren'])
+ $builder
+ ->add('uploadCollectingOrders', CheckboxType::class, ['required' => false, 'label' => 'Aktivieren'])
+ ->add('collectingOrdersChangePicture', CheckboxType::class, [
+ 'required' => false,
+ 'label' => 'Bild tauschen aktivieren',
+ ])
->add('collectingOrdersCopy', CheckboxType::class, ['required' => false, 'label' => 'Mitarbeiter kopieren'])
- ->add('collectingOrdersNewContact', CheckboxType::class, ['required' => false, 'label' => 'Neuen Mitarbeiter anlegen'])
- ->add('collectingOrdersInviteContact', CheckboxType::class, ['required' => false, 'label' => 'Mitarbeiter einladen'])
- ->add('collectingOrdersIntegrated', CheckboxType::class, ['required' => false, 'label' => 'nicht als Popup'])
- ->add('collectingOrdersAccountFilter', ChoiceType::class, array(
- 'choices' => array(
+ ->add('collectingOrdersNewContact', CheckboxType::class, [
+ 'required' => false,
+ 'label' => 'Neuen Mitarbeiter anlegen',
+ ])
+ ->add('collectingOrdersInviteContact', CheckboxType::class, [
+ 'required' => false,
+ 'label' => 'Mitarbeiter einladen',
+ ])
+ ->add('collectingOrdersIntegrated', CheckboxType::class, [
+ 'required' => false,
+ 'label' => 'nicht als Popup',
+ ])
+ ->add('collectingOrdersAccountFilter', ChoiceType::class, [
+ 'choices' => [
'Alle nicht gesperrten' => 1,
'Gleich der angemeldeten Firma' => 2,
'Filter nach gewählter Firma' => 3,
'Filter nach gewählter Firma + alle Personen aller Firmen die meiner Firma zugordnet sind' => 4,
'Gleich der angemeldeten Firma + alle Personen aller Firmen die meiner Firma zugordnet sind' => 5,
- ),
- 'label' => 'Firmenfilter'
- ))
- ->add("uploadCollectingOrdersInitalStatus", ChoiceType::class, array(
+ ],
+ 'label' => 'Firmenfilter',
+ ])
+ ->add('uploadCollectingOrdersInitalStatus', ChoiceType::class, [
'label' => 'Initalstatus',
'choices' => $this->statusService->getPositionStatusAsArray(),
- 'translation_domain' => 'posstatus'
- ))
- ->add('collectingOrdersAccount', ChoiceType::class, array(
+ 'translation_domain' => 'posstatus',
+ ])
+ ->add('collectingOrdersAccount', ChoiceType::class, [
'multiple' => false,
'expanded' => false,
'required' => false,
'label' => 'Gewählte Firma',
- 'choices' => $accounts
- ));
+ 'choices' => $accounts,
+ ]);
- if($product) {
+ if ($product) {
$builder->get('uploadCollectingOrders')->setData($product->isUploadCollectingOrders());
$builder->get('collectingOrdersChangePicture')->setData($product->isCollectingOrdersChangePicture());
$builder->get('collectingOrdersCopy')->setData($product->isCollectingOrdersCopy());
$builder->get('collectingOrdersNewContact')->setData($product->isCollectingOrdersNewContact());
$builder->get('collectingOrdersInviteContact')->setData($product->isCollectingOrdersInviteContact());
$builder->get('collectingOrdersAccountFilter')->setData($product->getCollectingOrdersAccountFilter());
- $builder->get('uploadCollectingOrdersInitalStatus')->setData($product->getUploadCollectingOrdersInitalStatus());
+ $builder
+ ->get('uploadCollectingOrdersInitalStatus')
+ ->setData($product->getUploadCollectingOrdersInitalStatus());
$builder->get('collectingOrdersAccount')->setData($product->getCollectingOrdersAccount());
}
@@ -122,7 +139,7 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
public function getGroup()
{
- return "Printess";
+ return 'Printess';
}
public function formPostSetData(FormEvent $event)
@@ -134,18 +151,39 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
{
/** @var Product $product */
$product = $event->getData();
- $product->setUploadCollectingOrders($event->getForm()->get('PrintessBulkorder')->get('uploadCollectingOrders')->getData());
- $product->setCollectingOrdersChangePicture($event->getForm()->get('PrintessBulkorder')->get('collectingOrdersChangePicture')->getData());
- $product->setCollectingOrdersCopy($event->getForm()->get('PrintessBulkorder')->get('collectingOrdersCopy')->getData());
- $product->setCollectingOrdersNewContact($event->getForm()->get('PrintessBulkorder')->get('collectingOrdersNewContact')->getData());
- $product->setCollectingOrdersInviteContact($event->getForm()->get('PrintessBulkorder')->get('collectingOrdersInviteContact')->getData());
- $product->setCollectingOrdersAccountFilter($event->getForm()->get('PrintessBulkorder')->get('collectingOrdersAccountFilter')->getData());
- $product->setUploadCollectingOrdersInitalStatus($event->getForm()->get('PrintessBulkorder')->get('uploadCollectingOrdersInitalStatus')->getData());
- $product->setCollectingOrdersAccount($event->getForm()->get('PrintessBulkorder')->get('collectingOrdersAccount')->getData());
+ $product->setUploadCollectingOrders(
+ $event->getForm()->get('PrintessBulkorder')->get('uploadCollectingOrders')->getData(),
+ );
+ $product->setCollectingOrdersChangePicture(
+ $event->getForm()->get('PrintessBulkorder')->get('collectingOrdersChangePicture')->getData(),
+ );
+ $product->setCollectingOrdersCopy(
+ $event->getForm()->get('PrintessBulkorder')->get('collectingOrdersCopy')->getData(),
+ );
+ $product->setCollectingOrdersNewContact(
+ $event->getForm()->get('PrintessBulkorder')->get('collectingOrdersNewContact')->getData(),
+ );
+ $product->setCollectingOrdersInviteContact(
+ $event->getForm()->get('PrintessBulkorder')->get('collectingOrdersInviteContact')->getData(),
+ );
+ $product->setCollectingOrdersAccountFilter(
+ $event->getForm()->get('PrintessBulkorder')->get('collectingOrdersAccountFilter')->getData(),
+ );
+ $product->setUploadCollectingOrdersInitalStatus(
+ $event->getForm()->get('PrintessBulkorder')->get('uploadCollectingOrdersInitalStatus')->getData(),
+ );
+ $product->setCollectingOrdersAccount(
+ $event->getForm()->get('PrintessBulkorder')->get('collectingOrdersAccount')->getData(),
+ );
}
public function formPreSetData(FormEvent $event)
{
// TODO: Implement formPreSetData() method.
}
-}
\ No newline at end of file
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
+}
+
diff --git a/src/new/var/plugins/Custom/PSC/Printess/Form/ProductSettings.php b/src/new/var/plugins/Custom/PSC/Printess/Form/ProductSettings.php
index c257c9717..476534eca 100755
--- a/src/new/var/plugins/Custom/PSC/Printess/Form/ProductSettings.php
+++ b/src/new/var/plugins/Custom/PSC/Printess/Form/ProductSettings.php
@@ -16,11 +16,11 @@ use Symfony\Component\Form\FormEvent;
#[AutoconfigureTag('psc.backend.custom.fields')]
class ProductSettings extends \PSC\System\PluginBundle\Form\Field implements Field
{
- protected $tab = "uploads";
+ protected $tab = 'uploads';
- public function __construct(private readonly Status $statusService)
- {
- }
+ public function __construct(
+ private readonly Status $statusService,
+ ) {}
public function getTemplate()
{
@@ -36,11 +36,11 @@ class ProductSettings extends \PSC\System\PluginBundle\Form\Field implements Fie
{
$builder
->add('uploadPrintess', CheckboxType::class, ['required' => false, 'label' => 'Aktivieren'])
- ->add("uploadPrintessInitalStatus", ChoiceType::class, array(
+ ->add('uploadPrintessInitalStatus', ChoiceType::class, [
'label' => 'Initalstatus',
'choices' => $this->statusService->getPositionStatusAsArray(),
- 'translation_domain' => 'posstatus'
- ))
+ 'translation_domain' => 'posstatus',
+ ])
->add('uploadPrintessTemplate', TextType::class, ['required' => false, 'label' => 'Template Name'])
->add('uploadPrintessDownload', CheckboxType::class, ['required' => false, 'label' => 'Download']);
@@ -63,11 +63,13 @@ class ProductSettings extends \PSC\System\PluginBundle\Form\Field implements Fie
public function formPostSubmit(FormEvent $event)
{
-
}
public function formPostSetData(FormEvent $event)
{
+ }
+ public function formSubmit(FormEvent $event)
+ {
}
}
diff --git a/src/new/var/plugins/Custom/PSC/Printess/Form/ShopSettings.php b/src/new/var/plugins/Custom/PSC/Printess/Form/ShopSettings.php
index 8251b59bd..8bedde3fb 100755
--- a/src/new/var/plugins/Custom/PSC/Printess/Form/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/Printess/Form/ShopSettings.php
@@ -14,7 +14,6 @@ use Symfony\Component\Form\FormEvent;
#[AutoconfigureTag('psc.backend.custom.fields')]
class ShopSettings implements Field
{
-
public function getTemplate()
{
return '@PluginCustomPSCPrintess/form/shop_settings.html.twig';
@@ -32,30 +31,46 @@ class ShopSettings implements Field
{
/** @var Shop $data */
$data = $event->getData();
- $data->setPluginSettingModule('printess', 'shopToken', $event->getForm()->get('printess')->get('shopToken')->getData());
- $data->setPluginSettingModule('printess', 'serviceToken', $event->getForm()->get('printess')->get('serviceToken')->getData());
+ $data->setPluginSettingModule(
+ 'printess',
+ 'shopToken',
+ $event->getForm()->get('printess')->get('shopToken')->getData(),
+ );
+ $data->setPluginSettingModule(
+ 'printess',
+ 'serviceToken',
+ $event->getForm()->get('printess')->get('serviceToken')->getData(),
+ );
}
public function formPostSetData(FormEvent $event)
{
/** @var Shop $data */
$data = $event->getData();
- $event->getForm()->get('printess')->get('shopToken')->setData($data->getPluginSettingModule('printess', 'shopToken'));
- $event->getForm()->get('printess')->get('serviceToken')->setData($data->getPluginSettingModule('printess', 'serviceToken'));
+ $event
+ ->getForm()
+ ->get('printess')
+ ->get('shopToken')
+ ->setData($data->getPluginSettingModule('printess', 'shopToken'));
+ $event
+ ->getForm()
+ ->get('printess')
+ ->get('serviceToken')
+ ->setData($data->getPluginSettingModule('printess', 'serviceToken'));
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
- $builder->add('shopToken', TextType::class, array(
+ $builder->add('shopToken', TextType::class, [
'label' => 'Shop Token',
'required' => false,
- 'mapped'=> false
- ));
- $builder->add('serviceToken', TextType::class, array(
+ 'mapped' => false,
+ ]);
+ $builder->add('serviceToken', TextType::class, [
'label' => 'Service Token',
'required' => false,
- 'mapped'=> false
- ));
+ 'mapped' => false,
+ ]);
return $builder;
}
@@ -69,6 +84,10 @@ class ShopSettings implements Field
{
}
+ public function formSubmit(FormEvent $event)
+ {
+ }
+
public function formPreSetData(FormEvent $event)
{
}
diff --git a/src/new/var/plugins/Custom/PSC/R2_Pitchprint/Form/BackendFields.php b/src/new/var/plugins/Custom/PSC/R2_Pitchprint/Form/BackendFields.php
index 092cb653b..67b26d263 100755
--- a/src/new/var/plugins/Custom/PSC/R2_Pitchprint/Form/BackendFields.php
+++ b/src/new/var/plugins/Custom/PSC/R2_Pitchprint/Form/BackendFields.php
@@ -69,4 +69,8 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/R2_Pitchprint/Form/Field/ShopSettings.php b/src/new/var/plugins/Custom/PSC/R2_Pitchprint/Form/Field/ShopSettings.php
index 7b7a9ea0b..ab7c7dc66 100755
--- a/src/new/var/plugins/Custom/PSC/R2_Pitchprint/Form/Field/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/R2_Pitchprint/Form/Field/ShopSettings.php
@@ -72,4 +72,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Controller/Backend/OrderController.php b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Controller/Backend/OrderController.php
index 6a27654c0..58784b47f 100755
--- a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Controller/Backend/OrderController.php
+++ b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Controller/Backend/OrderController.php
@@ -4,7 +4,7 @@ namespace Plugin\Custom\PSC\R2_Sendcloud\Controller\Backend;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use Plugin\Custom\PSC\R2_Sendcloud\Form\ParcelsForm;
use Plugin\Custom\PSC\R2_Sendcloud\Form\SearchForm;
use Plugin\Custom\PSC\R2_Sendcloud\Model\Parcel;
diff --git a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Controller/Backend/SendController.php b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Controller/Backend/SendController.php
index c274b0f7c..ad9bf906a 100755
--- a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Controller/Backend/SendController.php
+++ b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Controller/Backend/SendController.php
@@ -5,7 +5,7 @@ namespace Plugin\Custom\PSC\R2_Sendcloud\Controller\Backend;
use Doctrine\ORM\EntityManagerInterface;
use Exception;
use Knp\Component\Pager\PaginatorInterface;
-use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
use Picqer\Carriers\SendCloud\DocumentDownloader;
use Picqer\Carriers\SendCloud\SendCloudApiException;
use Plugin\Custom\PSC\R2_Sendcloud\Form\ParcelsForm;
diff --git a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Form/SearchForm.php b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Form/SearchForm.php
index 4424e1cb0..160cdb626 100755
--- a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Form/SearchForm.php
+++ b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Form/SearchForm.php
@@ -2,8 +2,8 @@
namespace Plugin\Custom\PSC\R2_Sendcloud\Form;
-use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
+use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
+use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\RequestStack;
diff --git a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Form/ShopSettings.php b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Form/ShopSettings.php
index 8dfd23b9d..70405bca4 100755
--- a/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Form/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/R2_Sendcloud/Form/ShopSettings.php
@@ -14,9 +14,9 @@ use Symfony\Component\Form\FormEvent;
#[AutoconfigureTag('psc.backend.custom.fields')]
class ShopSettings implements Field
{
- public function __construct(private Status $statusService)
- {
- }
+ public function __construct(
+ private Status $statusService,
+ ) {}
public function getTemplate(): string
{
@@ -35,9 +35,21 @@ class ShopSettings implements Field
{
/** @var Shop $data */
$data = $event->getData();
- $data->setPluginSettingModule('r2sendcloud', 'publicKey', $event->getForm()->get('r2sendcloud')->get('publicKey')->getData());
- $data->setPluginSettingModule('r2sendcloud', 'secretKey', $event->getForm()->get('r2sendcloud')->get('secretKey')->getData());
- $data->setPluginSettingModule('r2sendcloud', 'status', $event->getForm()->get('r2sendcloud')->get('status')->getData());
+ $data->setPluginSettingModule(
+ 'r2sendcloud',
+ 'publicKey',
+ $event->getForm()->get('r2sendcloud')->get('publicKey')->getData(),
+ );
+ $data->setPluginSettingModule(
+ 'r2sendcloud',
+ 'secretKey',
+ $event->getForm()->get('r2sendcloud')->get('secretKey')->getData(),
+ );
+ $data->setPluginSettingModule(
+ 'r2sendcloud',
+ 'status',
+ $event->getForm()->get('r2sendcloud')->get('status')->getData(),
+ );
$event->setData($data);
}
@@ -45,32 +57,43 @@ class ShopSettings implements Field
{
/** @var Shop $data */
$data = $event->getData();
- $event->getForm()->get('r2sendcloud')->get('publicKey')->setData($data->getPluginSettingModule('r2sendcloud', 'publicKey'));
- $event->getForm()->get('r2sendcloud')->get('secretKey')->setData($data->getPluginSettingModule('r2sendcloud', 'secretKey'));
- $event->getForm()->get('r2sendcloud')->get('status')->setData($data->getPluginSettingModule('r2sendcloud', 'status'));
+ $event
+ ->getForm()
+ ->get('r2sendcloud')
+ ->get('publicKey')
+ ->setData($data->getPluginSettingModule('r2sendcloud', 'publicKey'));
+ $event
+ ->getForm()
+ ->get('r2sendcloud')
+ ->get('secretKey')
+ ->setData($data->getPluginSettingModule('r2sendcloud', 'secretKey'));
+ $event
+ ->getForm()
+ ->get('r2sendcloud')
+ ->get('status')
+ ->setData($data->getPluginSettingModule('r2sendcloud', 'status'));
}
public function buildForm(FormBuilderInterface $builder, array $options): FormBuilderInterface
{
-
- $builder->add('publicKey', TextType::class, array(
+ $builder->add('publicKey', TextType::class, [
'label' => 'Public Key',
'required' => false,
- 'mapped' => false
- ));
+ 'mapped' => false,
+ ]);
- $builder->add('secretKey', TextType::class, array(
+ $builder->add('secretKey', TextType::class, [
'label' => 'Secret Key',
'required' => false,
- 'mapped' => false
- ));
+ 'mapped' => false,
+ ]);
- $builder->add('status', ChoiceType::class, array(
+ $builder->add('status', ChoiceType::class, [
'label' => 'Status wenn versand',
'required' => false,
'choices' => $this->statusService->getOrderStatusAsArray(),
- 'mapped' => false
- ));
+ 'mapped' => false,
+ ]);
return $builder;
}
@@ -89,4 +112,8 @@ class ShopSettings implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Controller/OrderController.php b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Controller/OrderController.php
index 1e252e1a5..bf2f978a2 100755
--- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Controller/OrderController.php
+++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Controller/OrderController.php
@@ -2,34 +2,34 @@
namespace Plugin\Custom\PSC\Saxoprint_API_R1\Controller;
-use PSC\Shop\OrderBundle\Model\Base;
-use PSC\Shop\OrderBundle\Model\Order\Position;
use Plugin\Custom\PSC\Saxoprint_API_R1\Api\GetState;
use PSC\Shop\EntityBundle\Document\Order;
+use PSC\Shop\OrderBundle\Model\Base;
+use PSC\Shop\OrderBundle\Model\Order\Position;
use PSC\System\SettingsBundle\Service\Shop;
use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class OrderController extends AbstractController
{
- #[Template()]
+ #[Template('@PluginCustomPSCSaxoprint_API_R1/order/index.html.twig')]
public function indexAction(
- ?\PSC\Shop\EntityBundle\Entity\Order $order,
- Order $orderDoc,
- \PSC\Shop\OrderBundle\Service\Order $orderService,
+ null|\PSC\Shop\EntityBundle\Entity\Order $order,
+ null|Order $orderDoc,
+ null|\PSC\Shop\OrderBundle\Service\Order $orderService,
GetState $getStateService,
- Shop $shopService
+ Shop $shopService,
) {
- if($order && $order->getUuid() != "") {
+ if ($order && $order->getUuid() != '') {
$orderModel = $orderService->getOrderByUuid($order->getUuid());
$positions = [];
foreach ($orderModel->getPositions() as $position) {
- if($position->getProduct()->getSpecialProductTypeObject()->getTyp() != 100) {
+ if ($position->getProduct()->getSpecialProductTypeObject()->getTyp() != 100) {
continue;
}
- if ($position->getExternalOrderNumber() != "") {
+ if ($position->getExternalOrderNumber() != '') {
$getStateService->setShop($shopService->getMongoShopByUid($orderModel->getShop()->getId()));
$getStateService->setOrderNumber($position->getExternalOrderNumber());
$result = $getStateService->call();
@@ -37,14 +37,14 @@ class OrderController extends AbstractController
'externalNumber' => $position->getExternalOrderNumber(),
'pos' => $position->getPos(),
'type' => $position->getProduct()->getSpecialProductTypeObject()->getTyp(),
- 'status' => $result['State']
+ 'status' => $result['State'],
];
} else {
$positions[] = [
'externalNumber' => '',
'pos' => $position->getPos(),
'type' => $position->getProduct()->getSpecialProductTypeObject()->getTyp(),
- 'status' => 'nicht übermittelt'
+ 'status' => 'nicht übermittelt',
];
}
}
@@ -55,10 +55,9 @@ class OrderController extends AbstractController
return ['list' => false];
}
- #[Template()]
- public function detailAction(Base $order, Position $position): array
+ #[Template('@PluginCustomPSCSaxoprint_API_R1/order/detail.html.twig')]
+ public function detailAction(null|Base $order, null|Position $position): array
{
return ['position' => $position];
}
-
}
diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Form/Field/SaxoprintProduct.php b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Form/Field/SaxoprintProduct.php
index 891e47a81..87cd2c9f1 100755
--- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Form/Field/SaxoprintProduct.php
+++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Form/Field/SaxoprintProduct.php
@@ -12,8 +12,8 @@ use PSC\System\SettingsBundle\Service\Shop;
use PSC\System\SettingsBundle\Service\Tax;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
-use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\FileType;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Form;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
@@ -21,10 +21,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
class SaxoprintProduct implements Field
{
+ public function __construct() {}
- public function __construct()
- {
- }
public function getTemplate()
{
return '@PluginCustomPSCSaxoprint_API_R1/form/field/saxoprint_product.html.twig';
@@ -64,5 +62,8 @@ class SaxoprintProduct implements Field
{
// TODO: Implement formPreSetData() method.
}
-}
+ public function formSubmit(FormEvent $event)
+ {
+ }
+}
diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Form/Field/ShopSettings.php b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Form/Field/ShopSettings.php
index 091f37d73..28cfba7b8 100755
--- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Form/Field/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Form/Field/ShopSettings.php
@@ -2,8 +2,8 @@
namespace Plugin\Custom\PSC\Saxoprint_API_R1\Form\Field;
-use Plugin\System\PSC\HPLayouter\Form\Group\HPLayouter;
use Plugin\Custom\PSC\Saxoprint_API_R1\Form\Group\Saxosettings;
+use Plugin\System\PSC\HPLayouter\Form\Group\HPLayouter;
use PSC\Shop\EntityBundle\Document\Shop;
use PSC\Shop\EntityBundle\Entity\Cms;
use PSC\System\PluginBundle\Form\Interfaces\Field;
@@ -18,7 +18,6 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
class ShopSettings implements Field
{
-
public function getTemplate()
{
return '@PluginCustomPSCSaxoprint_API_R1/form/field/shop_settings.html.twig';
@@ -36,11 +35,31 @@ class ShopSettings implements Field
{
/** @var Shop $data */
$data = $event->getData();
- $data->setPluginSettingModule('saxoprint', 'customerNumber', $event->getForm()->get('saxoprint')->get('customerNumber')->getData());
- $data->setPluginSettingModule('saxoprint', 'sriAPIKey', $event->getForm()->get('saxoprint')->get('sriAPIKey')->getData());
- $data->setPluginSettingModule('saxoprint', 'saxoprintaufschlag', $event->getForm()->get('saxoprint')->get('saxoprintaufschlag')->getData());
- $data->setPluginSettingModule('saxoprint', 'saxoprintaufschlagFix', $event->getForm()->get('saxoprint')->get('saxoprintaufschlagFix')->getData());
- $data->setPluginSettingModule('saxoprint', 'useTestSystem', $event->getForm()->get('saxoprint')->get('useTestSystem')->getData());
+ $data->setPluginSettingModule(
+ 'saxoprint',
+ 'customerNumber',
+ $event->getForm()->get('saxoprint')->get('customerNumber')->getData(),
+ );
+ $data->setPluginSettingModule(
+ 'saxoprint',
+ 'sriAPIKey',
+ $event->getForm()->get('saxoprint')->get('sriAPIKey')->getData(),
+ );
+ $data->setPluginSettingModule(
+ 'saxoprint',
+ 'saxoprintaufschlag',
+ $event->getForm()->get('saxoprint')->get('saxoprintaufschlag')->getData(),
+ );
+ $data->setPluginSettingModule(
+ 'saxoprint',
+ 'saxoprintaufschlagFix',
+ $event->getForm()->get('saxoprint')->get('saxoprintaufschlagFix')->getData(),
+ );
+ $data->setPluginSettingModule(
+ 'saxoprint',
+ 'useTestSystem',
+ $event->getForm()->get('saxoprint')->get('useTestSystem')->getData(),
+ );
$event->setData($data);
}
@@ -48,39 +67,59 @@ class ShopSettings implements Field
{
/** @var Shop $data */
$data = $event->getData();
- $event->getForm()->get('saxoprint')->get('customerNumber')->setData($data->getPluginSettingModule('saxoprint', 'customerNumber'));
- $event->getForm()->get('saxoprint')->get('sriAPIKey')->setData($data->getPluginSettingModule('saxoprint', 'sriAPIKey'));
- $event->getForm()->get('saxoprint')->get('saxoprintaufschlag')->setData($data->getPluginSettingModule('saxoprint', 'saxoprintaufschlag'));
- $event->getForm()->get('saxoprint')->get('saxoprintaufschlagFix')->setData($data->getPluginSettingModule('saxoprint', 'saxoprintaufschlagFix'));
- $event->getForm()->get('saxoprint')->get('useTestSystem')->setData($data->getPluginSettingModule('saxoprint', 'useTestSystem'));
+ $event
+ ->getForm()
+ ->get('saxoprint')
+ ->get('customerNumber')
+ ->setData($data->getPluginSettingModule('saxoprint', 'customerNumber'));
+ $event
+ ->getForm()
+ ->get('saxoprint')
+ ->get('sriAPIKey')
+ ->setData($data->getPluginSettingModule('saxoprint', 'sriAPIKey'));
+ $event
+ ->getForm()
+ ->get('saxoprint')
+ ->get('saxoprintaufschlag')
+ ->setData($data->getPluginSettingModule('saxoprint', 'saxoprintaufschlag'));
+ $event
+ ->getForm()
+ ->get('saxoprint')
+ ->get('saxoprintaufschlagFix')
+ ->setData($data->getPluginSettingModule('saxoprint', 'saxoprintaufschlagFix'));
+ $event
+ ->getForm()
+ ->get('saxoprint')
+ ->get('useTestSystem')
+ ->setData($data->getPluginSettingModule('saxoprint', 'useTestSystem'));
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
- $builder->add('customerNumber', TextType::class, array(
+ $builder->add('customerNumber', TextType::class, [
'label' => 'Customer Number',
'required' => false,
- 'mapped'=> false
- ));
- $builder->add('sriAPIKey', TextType::class, array(
- 'label' => 'SRI API Key',
+ 'mapped' => false,
+ ]);
+ $builder->add('sriAPIKey', TextType::class, [
+ 'label' => 'SRI API Key',
'required' => false,
- 'mapped' => false
- ));
- $builder->add('saxoprintaufschlagFix', TextType::class, array(
- 'label' => 'Aufschlag Fix:',
- 'required' => false
- ));
- $builder->add('saxoprintaufschlag', TextType::class, array(
- 'label' => 'Aufschlag %',
+ 'mapped' => false,
+ ]);
+ $builder->add('saxoprintaufschlagFix', TextType::class, [
+ 'label' => 'Aufschlag Fix:',
'required' => false,
- 'mapped' => false
- ));
- $builder->add('useTestSystem', CheckboxType::class, array(
+ ]);
+ $builder->add('saxoprintaufschlag', TextType::class, [
+ 'label' => 'Aufschlag %',
+ 'required' => false,
+ 'mapped' => false,
+ ]);
+ $builder->add('useTestSystem', CheckboxType::class, [
'label' => 'Saxoprint Testsystem benutzen',
'required' => false,
- 'mapped' => false
- ));
+ 'mapped' => false,
+ ]);
return $builder;
}
@@ -98,4 +137,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Resources/views/order/detail.html.twig b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Resources/views/order/detail.html.twig
index ac88e0f27..3069652b9 100644
--- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Resources/views/order/detail.html.twig
+++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Resources/views/order/detail.html.twig
@@ -2,7 +2,7 @@
{% for elm in position.additionalInfos[0]['infos'] %}
{% if elm.text != "" %}
-- {{elm.label}}: {{elm.text}}
+- {{elm.name}}: {{elm.text}}
{% endif %}
{% endfor %}
diff --git a/src/new/var/plugins/Custom/PSC/Sendcloud/Form/Field/ShopSettings.php b/src/new/var/plugins/Custom/PSC/Sendcloud/Form/Field/ShopSettings.php
index e5f5a9c81..39688b9ef 100755
--- a/src/new/var/plugins/Custom/PSC/Sendcloud/Form/Field/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/Sendcloud/Form/Field/ShopSettings.php
@@ -118,4 +118,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/TemplateprintLayouter/Form/BackendFields.php b/src/new/var/plugins/Custom/PSC/TemplateprintLayouter/Form/BackendFields.php
index b22491635..ecd204500 100644
--- a/src/new/var/plugins/Custom/PSC/TemplateprintLayouter/Form/BackendFields.php
+++ b/src/new/var/plugins/Custom/PSC/TemplateprintLayouter/Form/BackendFields.php
@@ -187,5 +187,8 @@ class BackendFields extends \PSC\System\PluginBundle\Form\Field implements Field
{
// TODO: Implement formPreSetData() method.
}
-}
+ public function formSubmit(FormEvent $event)
+ {
+ }
+}
diff --git a/src/new/var/plugins/Custom/PSC/WMD_API/Controller/OrderController.php b/src/new/var/plugins/Custom/PSC/WMD_API/Controller/OrderController.php
index abea0cecb..d98ce6f3e 100755
--- a/src/new/var/plugins/Custom/PSC/WMD_API/Controller/OrderController.php
+++ b/src/new/var/plugins/Custom/PSC/WMD_API/Controller/OrderController.php
@@ -2,31 +2,32 @@
namespace Plugin\Custom\PSC\WMD_API\Controller;
+use Plugin\Custom\PSC\WMD_API\Api\GetState;
use PSC\Shop\EntityBundle\Document\Order;
use PSC\System\SettingsBundle\Service\Shop;
-use Plugin\Custom\PSC\WMD_API\Api\GetState;
use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class OrderController extends AbstractController
{
- #[Template()]
- public function indexAction(?\PSC\Shop\EntityBundle\Entity\Order $order,
- Order $orderDoc,
- \PSC\Shop\OrderBundle\Service\Order $orderService,
+ #[Template('@PluginCustomPSCWMD_API/order/index.html.twig')]
+ public function indexAction(
+ null|\PSC\Shop\EntityBundle\Entity\Order $order,
+ null|Order $orderDoc,
+ null|\PSC\Shop\OrderBundle\Service\Order $orderService,
GetState $getStateService,
- Shop $shopService
+ Shop $shopService,
) {
- if($order && $order->getUuid() != "") {
+ if ($order && $order->getUuid() != '') {
$orderModel = $orderService->getOrderByUuid($order->getUuid());
$positions = [];
foreach ($orderModel->getPositions() as $position) {
- if($position->getProduct()->getSpecialProductTypeObject()->getTyp() != 101) {
+ if ($position->getProduct()->getSpecialProductTypeObject()->getTyp() != 101) {
continue;
}
- if ($position->getExternalOrderNumber() != "") {
+ if ($position->getExternalOrderNumber() != '') {
$getStateService->setShop($shopService->getMongoShopByUid($orderModel->getShop()->getId()));
$getStateService->setOrderNumber($position->getExternalOrderNumber());
$result = $getStateService->call();
@@ -34,14 +35,14 @@ class OrderController extends AbstractController
'externalNumber' => $position->getExternalOrderNumber(),
'pos' => $position->getPos(),
'type' => $position->getProduct()->getSpecialProductTypeObject()->getTyp(),
- 'status' => $result['items'][0]['state']['key']
+ 'status' => $result['items'][0]['state']['key'],
];
} else {
$positions[] = [
'externalNumber' => '',
'pos' => $position->getPos(),
'type' => $position->getProduct()->getSpecialProductTypeObject()->getTyp(),
- 'status' => 'nicht übermittelt'
+ 'status' => 'nicht übermittelt',
];
}
}
@@ -51,7 +52,4 @@ class OrderController extends AbstractController
return ['list' => false];
}
-
-
}
-
diff --git a/src/new/var/plugins/Custom/PSC/WMD_API/Form/ProductSettings.php b/src/new/var/plugins/Custom/PSC/WMD_API/Form/ProductSettings.php
index 527d7e769..af477fb43 100755
--- a/src/new/var/plugins/Custom/PSC/WMD_API/Form/ProductSettings.php
+++ b/src/new/var/plugins/Custom/PSC/WMD_API/Form/ProductSettings.php
@@ -106,5 +106,9 @@ class ProductSettings implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/WMD_API/Form/ShopSettings.php b/src/new/var/plugins/Custom/PSC/WMD_API/Form/ShopSettings.php
index 5aaefdc80..7f31af986 100755
--- a/src/new/var/plugins/Custom/PSC/WMD_API/Form/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/WMD_API/Form/ShopSettings.php
@@ -82,4 +82,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/Zaikio/Form/ProductSettings.php b/src/new/var/plugins/Custom/PSC/Zaikio/Form/ProductSettings.php
index 80d650eb9..e7fd3e38d 100755
--- a/src/new/var/plugins/Custom/PSC/Zaikio/Form/ProductSettings.php
+++ b/src/new/var/plugins/Custom/PSC/Zaikio/Form/ProductSettings.php
@@ -103,4 +103,8 @@ class ProductSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/Custom/PSC/Zaikio/Form/ShopSettings.php b/src/new/var/plugins/Custom/PSC/Zaikio/Form/ShopSettings.php
index 69a82ebb5..2f2866ccb 100755
--- a/src/new/var/plugins/Custom/PSC/Zaikio/Form/ShopSettings.php
+++ b/src/new/var/plugins/Custom/PSC/Zaikio/Form/ShopSettings.php
@@ -67,4 +67,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Design.php b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Design.php
index 1056fd9c6..896851951 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Design.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Design.php
@@ -107,4 +107,8 @@ class Design implements Field
'translation_domain' => 'core_settings_edit'
));
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Formulare.php b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Formulare.php
index 17625fceb..919553953 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Formulare.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Formulare.php
@@ -216,4 +216,8 @@ class Formulare extends AbstractController implements Field
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/General.php b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/General.php
index 182c61944..b00dc5f3f 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/General.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/General.php
@@ -161,4 +161,8 @@ class General implements Field
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Images.php b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Images.php
index 063efcefe..de9aaf6d8 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Images.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Images.php
@@ -144,4 +144,8 @@ class Images extends AbstractController implements Field
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Product/PostUpload.php b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Product/PostUpload.php
index e845279b8..5f2e09f5d 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Product/PostUpload.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Product/PostUpload.php
@@ -110,5 +110,9 @@ class PostUpload implements Field
{
$this->_shopService = $shopService;
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Sites.php b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Sites.php
index c126c220b..4896c21fb 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Sites.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Sites.php
@@ -473,4 +473,8 @@ if(!file_exists($filenamecmsindex)) {
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Startseite.php b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Startseite.php
index 78da2fa90..8f3a48354 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Startseite.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Startseite.php
@@ -202,5 +202,9 @@ class Startseite implements Field
{
$this->_shopService = $shopService;
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Style.php b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Style.php
index b73543ce2..1cbefe0fa 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Style.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Style.php
@@ -142,4 +142,8 @@ class Style extends AbstractController implements Field
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Translator.php b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Translator.php
index 97deb4210..a4cfe997a 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Translator.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap3/Form/Field/Translator.php
@@ -314,4 +314,8 @@ foreach($directorys as $key => $directorysout) {
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Design.php b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Design.php
index bbbc3e7fc..ecb27a051 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Design.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Design.php
@@ -83,4 +83,8 @@ class Design implements Field
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Formulare.php b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Formulare.php
index 0478a7ac4..e3cb8bc04 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Formulare.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Formulare.php
@@ -323,5 +323,9 @@ class Formulare extends AbstractController implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/General.php b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/General.php
index 034e3cc25..595f60928 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/General.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/General.php
@@ -150,4 +150,8 @@ class General implements Field
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Images.php b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Images.php
index 2a03c9835..2ea4951b4 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Images.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Images.php
@@ -182,4 +182,8 @@ class Images extends AbstractController implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Product/PostUpload.php b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Product/PostUpload.php
index 225951ce1..129eeeab2 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Product/PostUpload.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Product/PostUpload.php
@@ -110,5 +110,9 @@ class PostUpload implements Field
{
$this->_shopService = $shopService;
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Sites.php b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Sites.php
index f71394f2d..c010822dc 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Sites.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Sites.php
@@ -504,4 +504,8 @@ if(isset($_POST["settings"]["bootstrap4Images"]["layout"])) {
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Startseite.php b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Startseite.php
index 472361a5d..50ac16574 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Startseite.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Startseite.php
@@ -196,5 +196,9 @@ class Startseite implements Field
{
$this->_shopService = $shopService;
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Style.php b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Style.php
index 35799326c..8849cb201 100755
--- a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Style.php
+++ b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/Style.php
@@ -147,4 +147,8 @@ if(isset($_POST["settings"]["bootstrap4General"]["layout"])) {
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
\ No newline at end of file
diff --git a/src/new/var/plugins/System/PSC/CaptchaFox/Form/Field/ShopSettings.php b/src/new/var/plugins/System/PSC/CaptchaFox/Form/Field/ShopSettings.php
index ab4cb872c..71e5b7828 100755
--- a/src/new/var/plugins/System/PSC/CaptchaFox/Form/Field/ShopSettings.php
+++ b/src/new/var/plugins/System/PSC/CaptchaFox/Form/Field/ShopSettings.php
@@ -13,7 +13,6 @@ use Symfony\Component\Form\FormEvent;
#[AutoconfigureTag('psc.backend.custom.fields')]
class ShopSettings implements Field
{
-
public function getTemplate()
{
return '@PluginSystemPSCCaptchaFox/form/field/shop_settings.html.twig';
@@ -31,8 +30,16 @@ class ShopSettings implements Field
{
/** @var Shop $data */
$data = $event->getData();
- $data->setPluginSettingModule('captchafox', 'secretkey', $event->getForm()->get('captchafox')->get('secretkey')->getData());
- $data->setPluginSettingModule('captchafox', 'publickey', $event->getForm()->get('captchafox')->get('publickey')->getData());
+ $data->setPluginSettingModule(
+ 'captchafox',
+ 'secretkey',
+ $event->getForm()->get('captchafox')->get('secretkey')->getData(),
+ );
+ $data->setPluginSettingModule(
+ 'captchafox',
+ 'publickey',
+ $event->getForm()->get('captchafox')->get('publickey')->getData(),
+ );
$event->setData($data);
}
@@ -40,22 +47,30 @@ class ShopSettings implements Field
{
/** @var Shop $data */
$data = $event->getData();
- $event->getForm()->get('captchafox')->get('secretkey')->setData($data->getPluginSettingModule('captchafox', 'secretkey'));
- $event->getForm()->get('captchafox')->get('publickey')->setData($data->getPluginSettingModule('captchafox', 'publickey'));
+ $event
+ ->getForm()
+ ->get('captchafox')
+ ->get('secretkey')
+ ->setData($data->getPluginSettingModule('captchafox', 'secretkey'));
+ $event
+ ->getForm()
+ ->get('captchafox')
+ ->get('publickey')
+ ->setData($data->getPluginSettingModule('captchafox', 'publickey'));
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
- $builder->add('secretkey', TextType::class, array(
+ $builder->add('secretkey', TextType::class, [
'label' => 'Secret Key',
'required' => false,
- 'mapped'=> false
- ));
- $builder->add('publickey', TextType::class, array(
+ 'mapped' => false,
+ ]);
+ $builder->add('publickey', TextType::class, [
'label' => 'Public Key',
'required' => false,
- 'mapped'=> false
- ));
+ 'mapped' => false,
+ ]);
return $builder;
}
@@ -73,4 +88,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/FriendlyCaptcha/Form/Field/ShopSettings.php b/src/new/var/plugins/System/PSC/FriendlyCaptcha/Form/Field/ShopSettings.php
index 12793059e..8286119ea 100755
--- a/src/new/var/plugins/System/PSC/FriendlyCaptcha/Form/Field/ShopSettings.php
+++ b/src/new/var/plugins/System/PSC/FriendlyCaptcha/Form/Field/ShopSettings.php
@@ -13,7 +13,6 @@ use Symfony\Component\Form\FormEvent;
#[AutoconfigureTag('psc.backend.custom.fields')]
class ShopSettings implements Field
{
-
public function getTemplate()
{
return '@PluginSystemPSCFriendlyCaptcha/form/field/shop_settings.html.twig';
@@ -31,8 +30,16 @@ class ShopSettings implements Field
{
/** @var Shop $data */
$data = $event->getData();
- $data->setPluginSettingModule('friendlycaptcha', 'secret', $event->getForm()->get('friendlycaptcha')->get('secret')->getData());
- $data->setPluginSettingModule('friendlycaptcha', 'siteKey', $event->getForm()->get('friendlycaptcha')->get('siteKey')->getData());
+ $data->setPluginSettingModule(
+ 'friendlycaptcha',
+ 'secret',
+ $event->getForm()->get('friendlycaptcha')->get('secret')->getData(),
+ );
+ $data->setPluginSettingModule(
+ 'friendlycaptcha',
+ 'siteKey',
+ $event->getForm()->get('friendlycaptcha')->get('siteKey')->getData(),
+ );
$event->setData($data);
}
@@ -40,22 +47,30 @@ class ShopSettings implements Field
{
/** @var Shop $data */
$data = $event->getData();
- $event->getForm()->get('friendlycaptcha')->get('secret')->setData($data->getPluginSettingModule('friendlycaptcha', 'secret'));
- $event->getForm()->get('friendlycaptcha')->get('siteKey')->setData($data->getPluginSettingModule('friendlycaptcha', 'siteKey'));
+ $event
+ ->getForm()
+ ->get('friendlycaptcha')
+ ->get('secret')
+ ->setData($data->getPluginSettingModule('friendlycaptcha', 'secret'));
+ $event
+ ->getForm()
+ ->get('friendlycaptcha')
+ ->get('siteKey')
+ ->setData($data->getPluginSettingModule('friendlycaptcha', 'siteKey'));
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
- $builder->add('secret', TextType::class, array(
+ $builder->add('secret', TextType::class, [
'label' => 'Secret',
'required' => false,
- 'mapped'=> false
- ));
- $builder->add('siteKey', TextType::class, array(
+ 'mapped' => false,
+ ]);
+ $builder->add('siteKey', TextType::class, [
'label' => 'SiteKey',
'required' => false,
- 'mapped'=> false
- ));
+ 'mapped' => false,
+ ]);
return $builder;
}
@@ -73,4 +88,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Invoice/Controller/Backend/OrderController.php b/src/new/var/plugins/System/PSC/Invoice/Controller/Backend/OrderController.php
index 7a5dee437..b1a1d5791 100755
--- a/src/new/var/plugins/System/PSC/Invoice/Controller/Backend/OrderController.php
+++ b/src/new/var/plugins/System/PSC/Invoice/Controller/Backend/OrderController.php
@@ -8,13 +8,9 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class OrderController extends AbstractController
{
- #[Template('@PluginSystemPSCInvoiceControllerBackend/order/index.html.twig')]
- public function indexAction(?\PSC\Shop\EntityBundle\Entity\Order $order,
- ?Order $orderDoc)
+ #[Template('@PluginSystemPSCInvoice/backend/order/index.html.twig')]
+ public function indexAction(null|\PSC\Shop\EntityBundle\Entity\Order $order, null|Order $orderDoc)
{
- return ['uuid' => $order? $order->getUuid(): false];
+ return ['uuid' => $order ? $order->getUuid() : false];
}
-
-
}
-
diff --git a/src/new/var/plugins/System/PSC/PSC_Reseller_Products/Form/Field/ResellerProduct.php b/src/new/var/plugins/System/PSC/PSC_Reseller_Products/Form/Field/ResellerProduct.php
index cc43b2ac8..3ec1f3150 100755
--- a/src/new/var/plugins/System/PSC/PSC_Reseller_Products/Form/Field/ResellerProduct.php
+++ b/src/new/var/plugins/System/PSC/PSC_Reseller_Products/Form/Field/ResellerProduct.php
@@ -106,5 +106,9 @@ class ResellerProduct implements Field
{
// TODO: Implement formPreSetData() method.
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/PSC_Reseller_Products/Form/Field/ShopSettings.php b/src/new/var/plugins/System/PSC/PSC_Reseller_Products/Form/Field/ShopSettings.php
index 4625ca89b..7bf89b8ec 100755
--- a/src/new/var/plugins/System/PSC/PSC_Reseller_Products/Form/Field/ShopSettings.php
+++ b/src/new/var/plugins/System/PSC/PSC_Reseller_Products/Form/Field/ShopSettings.php
@@ -243,4 +243,8 @@ class ShopSettings implements Field
public function formPreSetData(FormEvent $event)
{
}
+
+ public function formSubmit(FormEvent $event)
+ {
+ }
}
diff --git a/src/new/var/plugins/System/PSC/Warehouse/Form/Field/Calc.php b/src/new/var/plugins/System/PSC/Warehouse/Form/Field/Calc.php
index 6074cd71d..f011a7b38 100755
--- a/src/new/var/plugins/System/PSC/Warehouse/Form/Field/Calc.php
+++ b/src/new/var/plugins/System/PSC/Warehouse/Form/Field/Calc.php
@@ -23,7 +23,6 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
class Calc implements Field
{
-
protected $generalService;
protected $taxService;
@@ -52,16 +51,19 @@ class Calc implements Field
public function buildForm(FormBuilderInterface $builder, array $options)
{
-
$builder
- ->add("mwert", ChoiceType::class, array(
+ ->add('mwert', ChoiceType::class, [
'label' => 'MwSt.',
'choices' => $this->taxService->getTaxesForForm(),
- ))
+ ])
->add('fromPrice', TextType::class, ['required' => false, 'label' => 'Ab Preis'])
->add('weight', NumberType::class, ['required' => false, 'label' => 'Gewicht'])
->add('price', MoneyType::class, ['required' => false, 'label' => 'Fix Preis'])
- ->add('scaledPrice', TextareaType::class, ['required' => false, 'label' => 'Staffel Preis (ACHTUNG! Wenn im Feld Fix Preis ein Wert eingetragen wird, wird der Staffelpreis ignoriert.)', 'attr' => ['rows' => 5]]);
+ ->add('scaledPrice', TextareaType::class, [
+ 'required' => false,
+ 'label' => 'Staffel Preis (ACHTUNG! Wenn im Feld Fix Preis ein Wert eingetragen wird, wird der Staffelpreis ignoriert.)',
+ 'attr' => ['rows' => 5],
+ ]);
return $builder;
}
@@ -83,6 +85,14 @@ class Calc implements Field
}
public function formPostSubmit(FormEvent $event)
+ {
+ }
+
+ public function formPreSetData(FormEvent $event)
+ {
+ }
+
+ public function formSubmit(FormEvent $event)
{
/** @var Product $data */
$data = $event->getData();
@@ -93,9 +103,4 @@ class Calc implements Field
$data->setWeight($event->getForm()->get('warehouse')->get('weight')->getData());
$event->setData($data);
}
-
- public function formPreSetData(FormEvent $event)
- {
- }
}
-
diff --git a/src/new/var/plugins/System/PSC/XmlCalc/Api/GetPrice.php b/src/new/var/plugins/System/PSC/XmlCalc/Api/GetPrice.php
index 1a2e1bc4b..12bf3e9fb 100755
--- a/src/new/var/plugins/System/PSC/XmlCalc/Api/GetPrice.php
+++ b/src/new/var/plugins/System/PSC/XmlCalc/Api/GetPrice.php
@@ -34,6 +34,7 @@ use PSC\System\SettingsBundle\Service\Help;
use PSC\System\SettingsBundle\Service\PaperDB;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
+use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
@@ -84,12 +85,7 @@ class GetPrice extends AbstractController
#[RequestBody(content: new JsonContent(ref: new Model(type: PriceInput::class)))]
#[Tag(name: 'Plugin/System/psc/Xmlcalc/Price')]
#[Route(path: '/price', methods: ['POST'])]
- #[ParamConverter(
- 'data',
- class: '\Plugin\System\PSC\XmlCalc\Dto\Input\PriceInput',
- converter: 'psc_rest.request_body',
- )]
- public function getprice(PriceInput $data)
+ public function getprice(#[MapRequestPayload] PriceInput $data)
{
$output = new \Plugin\System\PSC\XmlCalc\Dto\Output\PriceOutput();
$output->product = $data->product;
diff --git a/src/new/var/plugins/System/PSC/XmlCalc/Form/Field/Calc.php b/src/new/var/plugins/System/PSC/XmlCalc/Form/Field/Calc.php
index 4ecfc61dc..5af40441a 100755
--- a/src/new/var/plugins/System/PSC/XmlCalc/Form/Field/Calc.php
+++ b/src/new/var/plugins/System/PSC/XmlCalc/Form/Field/Calc.php
@@ -14,7 +14,6 @@ use Symfony\Component\Form\FormEvent;
class Calc implements Field
{
-
protected $generalService;
protected $taxService;
@@ -34,37 +33,30 @@ class Calc implements Field
return Field::Product;
}
- /**
- * @param array $data
- */
- public function formPreSubmit(FormEvent $event)
- {
-
-
- }
-
public function buildForm(FormBuilderInterface $builder, array $options)
{
-
- $builder->add("mwert", ChoiceType::class, array('label' => 'MwSt.',
+ $builder->add('mwert', ChoiceType::class, [
+ 'label' => 'MwSt.',
'choices' => $this->taxService->getTaxesForForm(),
- ))
- ->add('fromPrice', TextType::class, ['required' => false, 'label' => 'Ab Preis'])
- ->add('calcXml', AceEditorType::class, array(
- 'wrapper_attr' => array(), // aceeditor wrapper html attributes.
- 'width' => '90%',
- 'height' => '500',
- 'font_size' => 14,
- 'mode' => 'ace/mode/xml', // every single default mode must have ace/mode/* prefix
- 'theme' => 'ace/theme/monokai', // every single default theme must have ace/theme/* prefix
- 'tab_size' => null,
- 'read_only' => null,
- 'use_soft_tabs' => null,
- 'use_wrap_mode' => null,
- 'show_print_margin' => null,
- 'required' => false,
- 'highlight_active_line' => null
- ));
+ ])->add('fromPrice', TextType::class, ['required' => false, 'label' => 'Ab Preis'])->add(
+ 'calcXml',
+ AceEditorType::class,
+ [
+ 'wrapper_attr' => [], // aceeditor wrapper html attributes.
+ 'width' => '90%',
+ 'height' => '500',
+ 'font_size' => 14,
+ 'mode' => 'ace/mode/xml', // every single default mode must have ace/mode/* prefix
+ 'theme' => 'ace/theme/monokai', // every single default theme must have ace/theme/* prefix
+ 'tab_size' => null,
+ 'read_only' => null,
+ 'use_soft_tabs' => null,
+ 'use_wrap_mode' => null,
+ 'show_print_margin' => null,
+ 'required' => false,
+ 'highlight_active_line' => null,
+ ],
+ );
return $builder;
}
@@ -83,7 +75,11 @@ class Calc implements Field
$event->getForm()->get('xmlCalc')->get('fromPrice')->setData($data->getFromPrice());
}
- public function formPostSubmit(FormEvent $event)
+ public function formPreSubmit(FormEvent $event)
+ {
+ }
+
+ public function formSubmit(FormEvent $event)
{
/** @var Product $data */
$data = $event->getData();
@@ -93,8 +89,11 @@ class Calc implements Field
$event->setData($data);
}
+ public function formPostSubmit(FormEvent $event)
+ {
+ }
+
public function formPreSetData(FormEvent $event)
{
-
}
-}
\ No newline at end of file
+}