Bläddra i källkod

Correctifs namespace modèles

master
Guillaume 3 år sedan
förälder
incheckning
ecfd0b161b
13 ändrade filer med 169 tillägg och 14 borttagningar
  1. +1
    -0
      config/packages/doctrine.yaml
  2. +2
    -2
      src/Controller/Admin/DashboardController.php
  3. +1
    -1
      src/Controller/Admin/UserCrudController.php
  4. +1
    -1
      src/Controller/IndexController.php
  5. +0
    -0
      src/Entity/.gitignore
  6. +27
    -0
      src/Entity/Address/Address.php
  7. +26
    -0
      src/Entity/Common/TaxRate.php
  8. +3
    -3
      src/Entity/File/File.php
  9. +2
    -4
      src/Entity/Site/Page.php
  10. +3
    -3
      src/Entity/User/User.php
  11. +50
    -0
      src/Repository/AddressRepository.php
  12. +50
    -0
      src/Repository/TaxRateRepository.php
  13. +3
    -0
      symfony.lock

+ 1
- 0
config/packages/doctrine.yaml Visa fil

@@ -16,3 +16,4 @@ doctrine:
resolve_target_entities:
Lc\SovBundle\Model\User\UserInterface: App\Entity\User
Lc\SovBundle\Doctrine\Extension\FileInterface: App\Entity\File
Lc\CaracoleBundle\Model\Address\AddressInterface: App\Entity\Address\Address

+ 2
- 2
src/Controller/Admin/DashboardController.php Visa fil

@@ -3,8 +3,8 @@
namespace App\Controller\Admin;


use App\Entity\Page;
use App\Entity\User;
use App\Entity\Site\Page;
use App\Entity\User\User;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
use Lc\SovBundle\Controller\Admin\DashboardController as LcDashboardController;


+ 1
- 1
src/Controller/Admin/UserCrudController.php Visa fil

@@ -2,7 +2,7 @@

namespace App\Controller\Admin;

use App\Entity\User;
use App\Entity\User\User;
use Lc\SovBundle\Controller\Admin\UserCrudController as AbstractUserCrudController;

class UserCrudController extends AbstractUserCrudController

+ 1
- 1
src/Controller/IndexController.php Visa fil

@@ -2,7 +2,7 @@

namespace App\Controller;

use App\Entity\Page;
use App\Entity\Site\Page;
use Lc\SovBundle\Doctrine\EntityManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;

+ 0
- 0
src/Entity/.gitignore Visa fil


+ 27
- 0
src/Entity/Address/Address.php Visa fil

@@ -0,0 +1,27 @@
<?php

namespace App\Entity\Address;

use App\Repository\AddressRepository;
use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Model\Address\AddressModel;
use Lc\CaracoleBundle\Model\AddressAbstract;
use Lc\CaracoleBundle\Model\AddressInterface;

/**
* @ORM\Entity(repositoryClass=AddressRepository::class)
*/
class Address extends AddressModel implements AddressInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;

public function getId(): ?int
{
return $this->id;
}
}

+ 26
- 0
src/Entity/Common/TaxRate.php Visa fil

@@ -0,0 +1,26 @@
<?php

namespace App\Entity\Common;

use App\Repository\TaxRateRepository;
use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Model\Common\TaxRateInterface;
use Lc\CaracoleBundle\Model\Common\TaxRateModel;

/**
* @ORM\Entity(repositoryClass=TaxRateRepository::class)
*/
class TaxRate extends TaxRateModel implements TaxRateInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;

public function getId(): ?int
{
return $this->id;
}
}

src/Entity/File.php → src/Entity/File/File.php Visa fil

@@ -1,16 +1,16 @@
<?php

namespace App\Entity;
namespace App\Entity\File;

use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Model\File\FileInterface;
use Lc\SovBundle\Model\File\FileModel;
use Lc\SovBundle\Repository\File\FileRepository;
use Lc\SovBundle\Model\File\File as LcFileModel;

/**
* @ORM\Entity(repositoryClass=FileRepository::class)
*/
class File extends LcFileModel implements FileInterface
class File extends FileModel implements FileInterface
{
/**
* @ORM\Id

src/Entity/Page.php → src/Entity/Site/Page.php Visa fil

@@ -1,12 +1,13 @@
<?php

namespace App\Entity;
namespace App\Entity\Site;

use App\Repository\PageRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Pattern\EntityFullAbstract;
use App\Entity\File\File ;

/**
* @ORM\Entity(repositoryClass=PageRepository::class)
@@ -36,8 +37,6 @@ class Page extends EntityFullAbstract
$this->gallery = new ArrayCollection();
}



public function getId(): ?int
{
return $this->id;
@@ -79,5 +78,4 @@ class Page extends EntityFullAbstract
return $this;
}


}

src/Entity/User.php → src/Entity/User/User.php Visa fil

@@ -1,17 +1,17 @@
<?php

namespace App\Entity;
namespace App\Entity\User;

use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Model\User\UserModel;
use Lc\SovBundle\Model\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Lc\SovBundle\Model\User\User as LcUserModel;

/**
* @ORM\Entity(repositoryClass="Lc\SovBundle\Repository\User\UserRepository")
* @UniqueEntity(fields={"email"}, message="There is already an account with this email")
*/
class User extends LcUserModel implements UserInterface
class User extends UserModel implements UserInterface
{
/**
* @ORM\Id

+ 50
- 0
src/Repository/AddressRepository.php Visa fil

@@ -0,0 +1,50 @@
<?php

namespace App\Repository;

use App\Entity\Address;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method Address|null find($id, $lockMode = null, $lockVersion = null)
* @method Address|null findOneBy(array $criteria, array $orderBy = null)
* @method Address[] findAll()
* @method Address[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class AddressRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Address::class);
}

// /**
// * @return Address[] Returns an array of Address objects
// */
/*
public function findByExampleField($value)
{
return $this->createQueryBuilder('a')
->andWhere('a.exampleField = :val')
->setParameter('val', $value)
->orderBy('a.id', 'ASC')
->setMaxResults(10)
->getQuery()
->getResult()
;
}
*/

/*
public function findOneBySomeField($value): ?Address
{
return $this->createQueryBuilder('a')
->andWhere('a.exampleField = :val')
->setParameter('val', $value)
->getQuery()
->getOneOrNullResult()
;
}
*/
}

+ 50
- 0
src/Repository/TaxRateRepository.php Visa fil

@@ -0,0 +1,50 @@
<?php

namespace App\Repository;

use App\Entity\TaxRate;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method TaxRate|null find($id, $lockMode = null, $lockVersion = null)
* @method TaxRate|null findOneBy(array $criteria, array $orderBy = null)
* @method TaxRate[] findAll()
* @method TaxRate[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class TaxRateRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, TaxRate::class);
}

// /**
// * @return TaxRate[] Returns an array of TaxRate objects
// */
/*
public function findByExampleField($value)
{
return $this->createQueryBuilder('t')
->andWhere('t.exampleField = :val')
->setParameter('val', $value)
->orderBy('t.id', 'ASC')
->setMaxResults(10)
->getQuery()
->getResult()
;
}
*/

/*
public function findOneBySomeField($value): ?TaxRate
{
return $this->createQueryBuilder('t')
->andWhere('t.exampleField = :val')
->setParameter('val', $value)
->getQuery()
->getOneOrNullResult()
;
}
*/
}

+ 3
- 0
symfony.lock Visa fil

@@ -155,6 +155,9 @@
"oomphinc/composer-installers-extender": {
"version": "2.0.0"
},
"php": {
"version": "7.4"
},
"phpdocumentor/reflection-common": {
"version": "2.2.0"
},

Laddar…
Avbryt
Spara