Browse Source

Création du projet

master
Fab 3 years ago
parent
commit
674605a917
7 changed files with 12 additions and 24 deletions
  1. +2
    -2
      config/packages/doctrine.yaml
  2. +1
    -1
      src/Controller/IndexController.php
  3. +3
    -8
      src/Entity/File.php
  4. +2
    -9
      src/Entity/Page.php
  5. +1
    -1
      src/Entity/User.php
  6. +2
    -2
      src/Repository/PageRepository.php
  7. +1
    -1
      src/Twig/TwigExtension.php

+ 2
- 2
config/packages/doctrine.yaml View File

@@ -14,5 +14,5 @@ doctrine:
prefix: 'App\Entity'
alias: App
resolve_target_entities:
Lc\SovBundle\IModel\User\UserInterface: App\Entity\User
Lc\SovBundle\IModel\Cms\FileInterface: App\Entity\File
Lc\SovBundle\Model\User\UserInterface: App\Entity\User
Lc\SovBundle\Doctrine\Extension\FileInterface: App\Entity\File

+ 1
- 1
src/Controller/IndexController.php View File

@@ -3,7 +3,7 @@
namespace App\Controller;

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


+ 3
- 8
src/Entity/File.php View File

@@ -3,15 +3,12 @@
namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\IModel\Cms\FileInterface;
use Lc\SovBundle\Repository\Cms\FileRepository;
use Lc\SovBundle\Model\Cms\File as LcFileModel;
use Gedmo\Mapping\Annotation as Gedmo;
use Lc\SovBundle\Entity\Translation\EntityTranslation;
use Lc\SovBundle\Model\File\FileInterface;
use Lc\SovBundle\Repository\File\FileRepository;
use Lc\SovBundle\Model\File\File as LcFileModel;

/**
* @ORM\Entity(repositoryClass=FileRepository::class)
* @Gedmo\TranslationEntity(class=EntityTranslation::class)
*/
class File extends LcFileModel implements FileInterface
{
@@ -22,8 +19,6 @@ class File extends LcFileModel implements FileInterface
*/
private $id;



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

+ 2
- 9
src/Entity/Page.php View File

@@ -6,20 +6,13 @@ use App\Repository\PageRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Lc\SovBundle\Entity\Translation\EntityTranslation;
use Lc\SovBundle\IModel\Translation\TranslatableInterface;
use Lc\SovBundle\Model\Cms\AbstractDocument;
use Lc\SovBundle\Model\Translation\TranslatableTrait;
use Lc\SovBundle\Doctrine\Pattern\EntityFullAbstract;

/**
* @ORM\Entity(repositoryClass=PageRepository::class)
* @Gedmo\TranslationEntity(class=EntityTranslation::class)
*/
class Page extends AbstractDocument implements TranslatableInterface
class Page extends EntityFullAbstract
{
use TranslatableTrait;

/**
* @ORM\Id
* @ORM\GeneratedValue

+ 1
- 1
src/Entity/User.php View File

@@ -3,7 +3,7 @@
namespace App\Entity;

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


+ 2
- 2
src/Repository/PageRepository.php View File

@@ -3,7 +3,7 @@
namespace App\Repository;

use App\Entity\Page;
use Lc\SovBundle\Repository\BaseRepository;
use Lc\SovBundle\Repository\RepositoryAbstract;

/**
* @method Page|null find($id, $lockMode = null, $lockVersion = null)
@@ -11,7 +11,7 @@ use Lc\SovBundle\Repository\BaseRepository;
* @method Page[] findAll()
* @method Page[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class PageRepository extends BaseRepository
class PageRepository extends RepositoryAbstract
{
public function getInterfaceClass()
{

+ 1
- 1
src/Twig/TwigExtension.php View File

@@ -3,7 +3,7 @@
namespace App\Twig;

use App\Entity\Page;
use Lc\SovBundle\Manager\EntityManager;
use Lc\SovBundle\Doctrine\EntityManager;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
use Twig\TwigFunction;

Loading…
Cancel
Save