@@ -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 |
@@ -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; | |||
@@ -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 |
@@ -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 +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; | |||
} | |||
} |
@@ -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; | |||
} | |||
} |
@@ -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 |
@@ -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; | |||
} | |||
} |
@@ -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 |
@@ -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() | |||
; | |||
} | |||
*/ | |||
} |
@@ -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() | |||
; | |||
} | |||
*/ | |||
} |
@@ -155,6 +155,9 @@ | |||
"oomphinc/composer-installers-extender": { | |||
"version": "2.0.0" | |||
}, | |||
"php": { | |||
"version": "7.4" | |||
}, | |||
"phpdocumentor/reflection-common": { | |||
"version": "2.2.0" | |||
}, |