mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-21 03:14:52 +02:00
Renamed the base DBElement classes to AbstractDBElement to comply with symfony recommendations.
This commit is contained in:
parent
da72f5b3ec
commit
594c694ee0
62 changed files with 203 additions and 203 deletions
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Services\Attachments\FileTypeFilterTools;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\Form\CallbackTransformer;
|
||||
|
@ -42,7 +42,7 @@ class AttachmentTypeAdminForm extends BaseEntityAdminForm
|
|||
parent::__construct($security, $params);
|
||||
}
|
||||
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$is_new = null === $entity->getID();
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ declare(strict_types=1);
|
|||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Attachments\Attachment;
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\StructuralDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Form\AttachmentFormType;
|
||||
use App\Form\Type\MasterPictureAttachmentType;
|
||||
use App\Form\Type\StructuralEntityType;
|
||||
|
@ -62,7 +62,7 @@ class BaseEntityAdminForm extends AbstractType
|
|||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
/** @var StructuralDBElement $entity */
|
||||
/** @var AbstractStructuralDBElement $entity */
|
||||
$entity = $options['data'];
|
||||
$is_new = null === $entity->getID();
|
||||
|
||||
|
@ -140,7 +140,7 @@ class BaseEntityAdminForm extends AbstractType
|
|||
]);
|
||||
}
|
||||
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
//Empty for Base
|
||||
}
|
||||
|
|
|
@ -24,14 +24,14 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CategoryAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$is_new = null === $entity->getID();
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TelType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
|
@ -33,7 +33,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||
|
||||
class CompanyForm extends BaseEntityAdminForm
|
||||
{
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$is_new = null === $entity->getID();
|
||||
|
||||
|
|
|
@ -24,14 +24,14 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CurrencyType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CurrencyAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$is_new = null === $entity->getID();
|
||||
|
||||
|
|
|
@ -24,13 +24,13 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Form\Type\MasterPictureAttachmentType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class FootprintAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
public function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
public function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$builder->add('footprint_3d', MasterPictureAttachmentType::class, [
|
||||
'required' => false,
|
||||
|
|
|
@ -24,14 +24,14 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Form\Permissions\PermissionsType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class GroupAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$is_new = null === $entity->getID();
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\StructuralDBElement;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Form\Type\StructuralEntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
|
@ -71,7 +71,7 @@ class ImportType extends AbstractType
|
|||
'disabled' => $disabled,
|
||||
]);
|
||||
|
||||
if ($entity instanceof StructuralDBElement) {
|
||||
if ($entity instanceof AbstractStructuralDBElement) {
|
||||
$builder->add('parent', StructuralEntityType::class, [
|
||||
'class' => $data['entity_class'],
|
||||
'required' => false,
|
||||
|
|
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\StructuralDBElement;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Form\Type\StructuralEntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
|
@ -61,7 +61,7 @@ class MassCreationForm extends AbstractType
|
|||
'rows' => 10,
|
||||
],
|
||||
]);
|
||||
if ($entity instanceof StructuralDBElement) {
|
||||
if ($entity instanceof AbstractStructuralDBElement) {
|
||||
$builder->add('parent', StructuralEntityType::class, [
|
||||
'class' => $data['entity_class'],
|
||||
'required' => false,
|
||||
|
|
|
@ -24,14 +24,14 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class MeasurementUnitAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$is_new = null === $entity->getID();
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\Parts\MeasurementUnit;
|
||||
use App\Form\Type\StructuralEntityType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
|
@ -32,7 +32,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||
|
||||
class StorelocationAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$is_new = null === $entity->getID();
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\PriceInformations\Currency;
|
||||
use App\Form\Type\StructuralEntityType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
|
||||
|
@ -32,7 +32,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||
|
||||
class SupplierForm extends CompanyForm
|
||||
{
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, NamedDBElement $entity): void
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$is_new = null === $entity->getID();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue