mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 11:54:32 +02:00
Use imports instead of FQNs
This commit is contained in:
parent
f63b6d7207
commit
5629215ce4
179 changed files with 792 additions and 597 deletions
|
@ -22,17 +22,17 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Services\Attachments\FileTypeFilterTools;
|
||||
use App\Services\LogSystem\EventCommentNeededHelper;
|
||||
use Symfony\Component\Form\CallbackTransformer;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class AttachmentTypeAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
public function __construct(\Symfony\Bundle\SecurityBundle\Security $security, protected FileTypeFilterTools $filterTools, EventCommentNeededHelper $eventCommentNeededHelper)
|
||||
public function __construct(Security $security, protected FileTypeFilterTools $filterTools, EventCommentNeededHelper $eventCommentNeededHelper)
|
||||
{
|
||||
parent::__construct($security, $eventCommentNeededHelper);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Entity\LabelSystem\LabelProfile;
|
||||
|
@ -40,11 +41,10 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
|||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class BaseEntityAdminForm extends AbstractType
|
||||
{
|
||||
public function __construct(protected \Symfony\Bundle\SecurityBundle\Security $security, protected EventCommentNeededHelper $eventCommentNeededHelper)
|
||||
public function __construct(protected Security $security, protected EventCommentNeededHelper $eventCommentNeededHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -22,17 +22,17 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Form\Type\BigDecimalMoneyType;
|
||||
use App\Services\LogSystem\EventCommentNeededHelper;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CurrencyType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class CurrencyAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
public function __construct(\Symfony\Bundle\SecurityBundle\Security $security, EventCommentNeededHelper $eventCommentNeededHelper, private readonly string $base_currency)
|
||||
public function __construct(Security $security, EventCommentNeededHelper $eventCommentNeededHelper, private readonly string $base_currency)
|
||||
{
|
||||
parent::__construct($security, $eventCommentNeededHelper);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Entity\Parts\Category;
|
||||
use App\Entity\Parts\Part;
|
||||
|
@ -33,11 +34,10 @@ use Symfony\Component\Form\Extension\Core\Type\FileType;
|
|||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class ImportType extends AbstractType
|
||||
{
|
||||
public function __construct(protected \Symfony\Bundle\SecurityBundle\Security $security)
|
||||
public function __construct(protected Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -22,17 +22,17 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Form\Type\StructuralEntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class MassCreationForm extends AbstractType
|
||||
{
|
||||
public function __construct(protected \Symfony\Bundle\SecurityBundle\Security $security)
|
||||
public function __construct(protected Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -22,17 +22,17 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\PriceInformations\Currency;
|
||||
use App\Form\Type\BigDecimalMoneyType;
|
||||
use App\Form\Type\StructuralEntityType;
|
||||
use App\Services\LogSystem\EventCommentNeededHelper;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class SupplierForm extends CompanyForm
|
||||
{
|
||||
public function __construct(\Symfony\Bundle\SecurityBundle\Security $security, EventCommentNeededHelper $eventCommentNeededHelper, protected string $base_currency)
|
||||
public function __construct(Security $security, EventCommentNeededHelper $eventCommentNeededHelper, protected string $base_currency)
|
||||
{
|
||||
parent::__construct($security, $eventCommentNeededHelper);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Attachments\Attachment;
|
||||
use App\Entity\Attachments\AttachmentType;
|
||||
use App\Form\Type\StructuralEntityType;
|
||||
|
@ -41,14 +42,13 @@ use Symfony\Component\Form\FormView;
|
|||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Validator\Constraints\File;
|
||||
use Symfony\Component\Validator\Constraints\Url;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class AttachmentFormType extends AbstractType
|
||||
{
|
||||
public function __construct(protected AttachmentManager $attachment_helper, protected UrlGeneratorInterface $urlGenerator, protected \Symfony\Bundle\SecurityBundle\Security $security, protected AttachmentSubmitHandler $submitHandler, protected TranslatorInterface $translator, protected bool $allow_attachments_download, protected string $max_file_size)
|
||||
public function __construct(protected AttachmentManager $attachment_helper, protected UrlGeneratorInterface $urlGenerator, protected Security $security, protected AttachmentSubmitHandler $submitHandler, protected TranslatorInterface $translator, protected bool $allow_attachments_download, protected string $max_file_size)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\LabelSystem\LabelOptions;
|
||||
use App\Form\Type\RichTextEditorType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
|
@ -49,11 +50,10 @@ use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
|||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class LabelOptionsType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly \Symfony\Bundle\SecurityBundle\Security $security)
|
||||
public function __construct(private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\LabelSystem;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Form\LabelOptionsType;
|
||||
use App\Validator\Constraints\Misc\ValidRange;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
|
@ -48,11 +49,10 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
|||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class LabelDialogType extends AbstractType
|
||||
{
|
||||
public function __construct(protected \Symfony\Bundle\SecurityBundle\Security $security)
|
||||
public function __construct(protected Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\Part;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Parts\MeasurementUnit;
|
||||
use App\Entity\Parts\Supplier;
|
||||
use App\Entity\PriceInformations\Orderdetail;
|
||||
|
@ -36,11 +37,10 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class OrderdetailType extends AbstractType
|
||||
{
|
||||
public function __construct(protected \Symfony\Bundle\SecurityBundle\Security $security)
|
||||
public function __construct(protected Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ class OrderdetailType extends AbstractType
|
|||
$orderdetail = $event->getData();
|
||||
|
||||
$dummy_pricedetail = new Pricedetail();
|
||||
if ($orderdetail instanceof \App\Entity\PriceInformations\Orderdetail && $orderdetail->getSupplier() instanceof \App\Entity\Parts\Supplier) {
|
||||
if ($orderdetail instanceof Orderdetail && $orderdetail->getSupplier() instanceof Supplier) {
|
||||
$dummy_pricedetail->setCurrency($orderdetail->getSupplier()->getDefaultCurrency());
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\Part;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Attachments\PartAttachment;
|
||||
use App\Entity\Parameters\PartParameter;
|
||||
use App\Entity\Parts\Category;
|
||||
|
@ -48,11 +49,10 @@ use Symfony\Component\Form\Extension\Core\Type\UrlType;
|
|||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class PartBaseType extends AbstractType
|
||||
{
|
||||
public function __construct(protected \Symfony\Bundle\SecurityBundle\Security $security, protected UrlGeneratorInterface $urlGenerator, protected EventCommentNeededHelper $event_comment_needed_helper)
|
||||
public function __construct(protected Security $security, protected UrlGeneratorInterface $urlGenerator, protected EventCommentNeededHelper $event_comment_needed_helper)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\Part;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Parts\MeasurementUnit;
|
||||
use App\Entity\Parts\PartLot;
|
||||
use App\Entity\Parts\Storelocation;
|
||||
|
@ -34,11 +35,10 @@ use Symfony\Component\Form\Extension\Core\Type\DateType;
|
|||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class PartLotType extends AbstractType
|
||||
{
|
||||
public function __construct(protected \Symfony\Bundle\SecurityBundle\Security $security)
|
||||
public function __construct(protected Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
namespace App\Form\ProjectSystem;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Entity\Parts\PartLot;
|
||||
use App\Form\Type\PartLotSelectType;
|
||||
use App\Form\Type\SIUnitType;
|
||||
|
@ -34,11 +36,10 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class ProjectBuildType extends AbstractType implements DataMapperInterface
|
||||
{
|
||||
public function __construct(private readonly \Symfony\Bundle\SecurityBundle\Security $security)
|
||||
public function __construct(private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -76,10 +77,10 @@ class ProjectBuildType extends AbstractType implements DataMapperInterface
|
|||
$form->add('addBuildsToBuildsPart', CheckboxType::class, [
|
||||
'label' => 'project.build.add_builds_to_builds_part',
|
||||
'required' => false,
|
||||
'disabled' => !$build_request->getProject()->getBuildPart() instanceof \App\Entity\Parts\Part,
|
||||
'disabled' => !$build_request->getProject()->getBuildPart() instanceof Part,
|
||||
]);
|
||||
|
||||
if ($build_request->getProject()->getBuildPart() instanceof \App\Entity\Parts\Part) {
|
||||
if ($build_request->getProject()->getBuildPart() instanceof Part) {
|
||||
$form->add('buildsPartLot', PartLotSelectType::class, [
|
||||
'label' => 'project.build.builds_part_lot',
|
||||
'required' => false,
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
namespace App\Form\Type\Helper;
|
||||
|
||||
use App\Entity\Attachments\Attachment;
|
||||
use App\Entity\Attachments\AttachmentType;
|
||||
use App\Entity\Base\AbstractDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
|
@ -42,7 +43,7 @@ class StructuralEntityChoiceHelper
|
|||
* Generates the choice attributes for the given AbstractStructuralDBElement.
|
||||
* @return array|string[]
|
||||
*/
|
||||
public function generateChoiceAttr(AbstractNamedDBElement $choice, \Symfony\Component\OptionsResolver\Options|array $options): array
|
||||
public function generateChoiceAttr(AbstractNamedDBElement $choice, Options|array $options): array
|
||||
{
|
||||
$tmp = [
|
||||
'data-level' => 0,
|
||||
|
@ -62,19 +63,19 @@ class StructuralEntityChoiceHelper
|
|||
$level = $choice->getLevel();
|
||||
/** @var AbstractStructuralDBElement|null $parent */
|
||||
$parent = $options['subentities_of'] ?? null;
|
||||
if ($parent instanceof \App\Entity\Base\AbstractStructuralDBElement) {
|
||||
if ($parent instanceof AbstractStructuralDBElement) {
|
||||
$level -= $parent->getLevel() - 1;
|
||||
}
|
||||
|
||||
$tmp += [
|
||||
'data-level' => $level,
|
||||
'data-parent' => $choice->getParent() instanceof \App\Entity\Base\AbstractStructuralDBElement ? $choice->getParent()->getFullPath() : null,
|
||||
'data-parent' => $choice->getParent() instanceof AbstractStructuralDBElement ? $choice->getParent()->getFullPath() : null,
|
||||
'data-path' => $choice->getFullPath('->'),
|
||||
];
|
||||
}
|
||||
|
||||
if ($choice instanceof HasMasterAttachmentInterface) {
|
||||
$tmp['data-image'] = $choice->getMasterPictureAttachment() instanceof \App\Entity\Attachments\Attachment ?
|
||||
$tmp['data-image'] = $choice->getMasterPictureAttachment() instanceof Attachment ?
|
||||
$this->attachmentURLGenerator->getThumbnailURL($choice->getMasterPictureAttachment(),
|
||||
'thumbnail_xs')
|
||||
: null
|
||||
|
@ -92,7 +93,7 @@ class StructuralEntityChoiceHelper
|
|||
* Generates the choice attributes for the given AbstractStructuralDBElement.
|
||||
* @return array|string[]
|
||||
*/
|
||||
public function generateChoiceAttrCurrency(Currency $choice, \Symfony\Component\OptionsResolver\Options|array $options): array
|
||||
public function generateChoiceAttrCurrency(Currency $choice, Options|array $options): array
|
||||
{
|
||||
$tmp = $this->generateChoiceAttr($choice, $options);
|
||||
$symbol = empty($choice->getIsoCode()) ? null : Currencies::getSymbol($choice->getIsoCode());
|
||||
|
@ -116,7 +117,7 @@ class StructuralEntityChoiceHelper
|
|||
*/
|
||||
public function generateChoiceValue(?AbstractNamedDBElement $element): string|int|null
|
||||
{
|
||||
if (!$element instanceof \App\Entity\Base\AbstractNamedDBElement) {
|
||||
if (!$element instanceof AbstractNamedDBElement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
namespace App\Form\Type;
|
||||
|
||||
use App\Entity\Parts\Storelocation;
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Entity\Parts\PartLot;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
@ -43,7 +44,7 @@ class PartLotSelectType extends AbstractType
|
|||
|
||||
$resolver->setDefaults([
|
||||
'class' => PartLot::class,
|
||||
'choice_label' => ChoiceList::label($this, static fn(PartLot $part_lot): string => ($part_lot->getStorageLocation() instanceof \App\Entity\Parts\Storelocation ? $part_lot->getStorageLocation()->getFullPath() : '')
|
||||
'choice_label' => ChoiceList::label($this, static fn(PartLot $part_lot): string => ($part_lot->getStorageLocation() instanceof Storelocation ? $part_lot->getStorageLocation()->getFullPath() : '')
|
||||
. ' (' . $part_lot->getName() . '): ' . $part_lot->getAmount()),
|
||||
'query_builder' => fn(Options $options) => static fn(EntityRepository $er) => $er->createQueryBuilder('l')
|
||||
->where('l.part = :part')
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
namespace App\Form\Type;
|
||||
|
||||
use App\Entity\Attachments\Attachment;
|
||||
use App\Entity\Parts\Category;
|
||||
use App\Entity\Parts\Footprint;
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Services\Attachments\AttachmentURLGenerator;
|
||||
use App\Services\Attachments\PartPreviewGenerator;
|
||||
|
@ -86,10 +89,10 @@ class PartSelectType extends AbstractType implements DataMapperInterface
|
|||
$resolver->setDefaults([
|
||||
//Prefill the selected choice with the needed data, so the user can see it without an additional Ajax request
|
||||
'choice_attr' => ChoiceList::attr($this, function (?Part $part) {
|
||||
if($part instanceof \App\Entity\Parts\Part) {
|
||||
if($part instanceof Part) {
|
||||
//Determine the picture to show:
|
||||
$preview_attachment = $this->previewGenerator->getTablePreviewAttachment($part);
|
||||
if ($preview_attachment instanceof \App\Entity\Attachments\Attachment) {
|
||||
if ($preview_attachment instanceof Attachment) {
|
||||
$preview_url = $this->attachmentURLGenerator->getThumbnailURL($preview_attachment,
|
||||
'thumbnail_sm');
|
||||
} else {
|
||||
|
@ -97,10 +100,10 @@ class PartSelectType extends AbstractType implements DataMapperInterface
|
|||
}
|
||||
}
|
||||
|
||||
return $part instanceof \App\Entity\Parts\Part ? [
|
||||
return $part instanceof Part ? [
|
||||
'data-description' => mb_strimwidth($part->getDescription(), 0, 127, '...'),
|
||||
'data-category' => $part->getCategory() instanceof \App\Entity\Parts\Category ? $part->getCategory()->getName() : '',
|
||||
'data-footprint' => $part->getFootprint() instanceof \App\Entity\Parts\Footprint ? $part->getFootprint()->getName() : '',
|
||||
'data-category' => $part->getCategory() instanceof Category ? $part->getCategory()->getName() : '',
|
||||
'data-footprint' => $part->getFootprint() instanceof Footprint ? $part->getFootprint()->getName() : '',
|
||||
'data-image' => $preview_url,
|
||||
] : [];
|
||||
})
|
||||
|
|
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\UserSystem\Group;
|
||||
use App\Entity\UserSystem\User;
|
||||
|
@ -43,12 +44,11 @@ use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|||
use Symfony\Component\Form\Extension\Core\Type\TimezoneType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Validator\Constraints\Length;
|
||||
|
||||
class UserAdminForm extends AbstractType
|
||||
{
|
||||
public function __construct(protected \Symfony\Bundle\SecurityBundle\Security $security)
|
||||
public function __construct(protected Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form;
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\UserSystem\User;
|
||||
use App\Form\Type\CurrencyEntityType;
|
||||
use App\Form\Type\RichTextEditorType;
|
||||
|
@ -39,12 +40,11 @@ use Symfony\Component\Form\Extension\Core\Type\TimezoneType;
|
|||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Validator\Constraints\File;
|
||||
|
||||
class UserSettingsType extends AbstractType
|
||||
{
|
||||
public function __construct(protected \Symfony\Bundle\SecurityBundle\Security $security, protected bool $demo_mode)
|
||||
public function __construct(protected Security $security, protected bool $demo_mode)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue