Fab 3 лет назад
Родитель
Сommit
58966560d1
46 измененных файлов: 280 добавлений и 197 удалений
  1. +2
    -2
      Authenticator/LoginFormAuthenticator.php
  2. +2
    -2
      Command/CreateUserCommand.php
  3. +1
    -1
      Controller/Admin/AbstractCrudController.php
  4. +1
    -1
      Doctrine/EntityInterface.php
  5. +1
    -1
      Doctrine/EntityManager.php
  6. +2
    -1
      Doctrine/Extension/BlameableInterface.php
  7. +2
    -2
      Doctrine/Extension/BlameableTrait.php
  8. +8
    -0
      Doctrine/Extension/DevAliasInterface.php
  9. +1
    -2
      Doctrine/Extension/DevAliasTrait.php
  10. +10
    -0
      Doctrine/Extension/OpenGraphInterface.php
  11. +64
    -0
      Doctrine/Extension/OpenGraphTrait.php
  12. +10
    -0
      Doctrine/Extension/SeoInterface.php
  13. +1
    -1
      Doctrine/Extension/SeoTrait.php
  14. +8
    -0
      Doctrine/Extension/SluggableInterface.php
  15. +1
    -1
      Doctrine/Extension/SluggableTrait.php
  16. +8
    -0
      Doctrine/Extension/SortableInterface.php
  17. +1
    -1
      Doctrine/Extension/SortableTrait.php
  18. +8
    -0
      Doctrine/Extension/StatusInterface.php
  19. +1
    -1
      Doctrine/Extension/StatusTrait.php
  20. +1
    -1
      Doctrine/Extension/TimestampableInterface.php
  21. +1
    -1
      Doctrine/Extension/TimestampableTrait.php
  22. +1
    -1
      Doctrine/Extension/TranslatableInterface.php
  23. +1
    -6
      Doctrine/Extension/TranslatableTrait.php
  24. +1
    -1
      Doctrine/Extension/TreeInterface.php
  25. +1
    -1
      Doctrine/Extension/TreeTrait.php
  26. +78
    -0
      Doctrine/Pattern/EntityFullAbstract.php
  27. +27
    -0
      Doctrine/Pattern/EntityLightAbstract.php
  28. +0
    -19
      Entity/Translation/EntityTranslation.php
  29. +2
    -2
      EventSubscriber/Translation/TranslationEasyAdminSubscriber.php
  30. +2
    -2
      Form/Type/FileManagerType.php
  31. +0
    -8
      IModel/Cms/DevAliasInterface.php
  32. +0
    -10
      IModel/Cms/SeoInterface.php
  33. +0
    -8
      IModel/Cms/SluggableInterface.php
  34. +0
    -8
      IModel/Cms/SortableInterface.php
  35. +0
    -8
      IModel/Cms/StatusInterface.php
  36. +0
    -69
      Model/Cms/AbstractDocument.php
  37. +14
    -18
      Model/File/File.php
  38. +1
    -1
      Model/File/FileInterface.php
  39. +1
    -1
      Model/User/User.php
  40. +1
    -1
      Model/User/UserInterface.php
  41. +5
    -5
      README.md
  42. +0
    -0
      Repository/.gitignore
  43. +4
    -4
      Repository/File/FileRepository.php
  44. +3
    -2
      Repository/RepositoryAbstract.php
  45. +1
    -1
      Repository/RepositoryAbstractInterface.php
  46. +3
    -3
      Repository/User/UserRepository.php

+ 2
- 2
Authenticator/LoginFormAuthenticator.php Просмотреть файл

@@ -2,8 +2,8 @@

namespace Lc\SovBundle\Authenticator;

use Lc\SovBundle\IModel\User\UserInterface;
use Lc\SovBundle\Manager\EntityManager;
use Lc\SovBundle\Model\User\UserInterface;
use Lc\SovBundle\Doctrine\EntityManager;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\User\UserInterface as SfUserInterface;

+ 2
- 2
Command/CreateUserCommand.php Просмотреть файл

@@ -3,8 +3,8 @@
namespace Lc\SovBundle\Command;


use Lc\SovBundle\IModel\User\UserInterface;
use Lc\SovBundle\Manager\EntityManager;
use Lc\SovBundle\Model\User\UserInterface;
use Lc\SovBundle\Doctrine\EntityManager;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;

+ 1
- 1
Controller/Admin/AbstractCrudController.php Просмотреть файл

@@ -9,7 +9,7 @@ use EasyCorp\Bundle\EasyAdminBundle\Config\Assets;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController as EaAbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator;
use Lc\SovBundle\IModel\Translation\TranslatableInterface;
use Lc\SovBundle\Doctrine\Extension\TranslatableInterface;

abstract class AbstractCrudController extends EaAbstractCrudController
{

IModel/EntityInterface.php → Doctrine/EntityInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel;
namespace Lc\SovBundle\Doctrine;

interface EntityInterface
{

Manager/EntityManager.php → Doctrine/EntityManager.php Просмотреть файл

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

namespace Lc\SovBundle\Manager;
namespace Lc\SovBundle\Doctrine;

use Doctrine\ORM\EntityManager as DoctrineEntityManager;
use Doctrine\ORM\EntityManagerInterface;

IModel/Cms/BlameableInterface.php → Doctrine/Extension/BlameableInterface.php Просмотреть файл

@@ -1,6 +1,7 @@
<?php

namespace Lc\SovBundle\IModel\Cms;
namespace Lc\SovBundle\Doctrine\Extension;


interface BlameableInterface
{

Model/Cms/BlameableTrait.php → Doctrine/Extension/BlameableTrait.php Просмотреть файл

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

namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Lc\SovBundle\IModel\User\UserInterface;
use Lc\SovBundle\Model\User\UserInterface;

trait BlameableTrait
{

+ 8
- 0
Doctrine/Extension/DevAliasInterface.php Просмотреть файл

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

namespace Lc\SovBundle\Doctrine\Extension;

interface DevAliasInterface
{

}

Model/Cms/DevAliasTrait.php → Doctrine/Extension/DevAliasTrait.php Просмотреть файл

@@ -1,8 +1,7 @@
<?php

namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

trait DevAliasTrait

+ 10
- 0
Doctrine/Extension/OpenGraphInterface.php Просмотреть файл

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

namespace Lc\SovBundle\Doctrine\Extension;

interface OpenGraphInterface
{



}

+ 64
- 0
Doctrine/Extension/OpenGraphTrait.php Просмотреть файл

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

namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Model\File\File;
use Lc\SovBundle\Model\File\FileInterface;

trait OpenGraphTrait
{
/**
* @ORM\Column(type="string", nullable=true)
*/
protected $openGraphTitle;

/**
* @ORM\Column(type="text", nullable=true)
*/
protected $openGraphDescription;

/**
* @ORM\ManyToOne(targetEntity=FileInterface::class, cascade={"persist", "remove"})
*/
protected $openGraphImage;

public function getOpenGraphTitle(): ?string
{
return $this->openGraphTitle;
}

public function setOpenGraphTitle(string $openGraphTitle): self
{
$this->openGraphTitle = $openGraphTitle;

return $this;
}

public function getOpenGraphDescription(): ?string
{
return $this->openGraphDescription;
}

public function setOpenGraphDescription(?string $openGraphDescription): self
{
$this->openGraphDescription = $openGraphDescription;

return $this;
}


public function getOpenGraphImage(): ?File
{
return $this->openGraphImage;
}

public function setOpenGraphImage(?File $openGraphImage): self
{
$this->openGraphImage = $openGraphImage;

return $this;
}


}

+ 10
- 0
Doctrine/Extension/SeoInterface.php Просмотреть файл

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

namespace Lc\SovBundle\Doctrine\Extension;

interface SeoInterface
{



}

Model/Cms/SeoTrait.php → Doctrine/Extension/SeoTrait.php Просмотреть файл

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

namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;


+ 8
- 0
Doctrine/Extension/SluggableInterface.php Просмотреть файл

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

namespace Lc\SovBundle\Doctrine\Extension;

interface SluggableInterface
{

}

Model/Cms/SluggableTrait.php → Doctrine/Extension/SluggableTrait.php Просмотреть файл

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

namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

+ 8
- 0
Doctrine/Extension/SortableInterface.php Просмотреть файл

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

namespace Lc\SovBundle\Doctrine\Extension;

interface SortableInterface
{

}

Model/Cms/SortableTrait.php → Doctrine/Extension/SortableTrait.php Просмотреть файл

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

namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

+ 8
- 0
Doctrine/Extension/StatusInterface.php Просмотреть файл

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

namespace Lc\SovBundle\Doctrine\Extension;

interface StatusInterface
{

}

Model/Cms/StatusTrait.php → Doctrine/Extension/StatusTrait.php Просмотреть файл

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

namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;


IModel/Cms/TimestampableInterface.php → Doctrine/Extension/TimestampableInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

interface TimestampableInterface
{

Model/Cms/TimestampableTrait.php → Doctrine/Extension/TimestampableTrait.php Просмотреть файл

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

namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

IModel/Translation/TranslatableInterface.php → Doctrine/Extension/TranslatableInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\Translation;
namespace Lc\SovBundle\Doctrine\Extension;

interface TranslatableInterface
{

Model/Translation/TranslatableTrait.php → Doctrine/Extension/TranslatableTrait.php Просмотреть файл

@@ -1,15 +1,10 @@
<?php

namespace Lc\SovBundle\Model\Translation;
namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Lc\SovBundle\Entity\Translation\EntityTranslation;


/**
* @Gedmo\TranslationEntity(class=EntityTranslation::class)
*/
trait TranslatableTrait
{
/**

IModel/Cms/TreeInterface.php → Doctrine/Extension/TreeInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

interface TreeInterface
{

Model/Cms/TreeTrait.php → Doctrine/Extension/TreeTrait.php Просмотреть файл

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

namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

+ 78
- 0
Doctrine/Pattern/EntityFullAbstract.php Просмотреть файл

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

namespace Lc\SovBundle\Doctrine\Pattern;

use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\SovBundle\Doctrine\Extension\BlameableInterface;
use Lc\SovBundle\Doctrine\Extension\BlameableTrait;
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasTrait;
use Lc\SovBundle\Doctrine\Extension\SeoInterface;
use Lc\SovBundle\Doctrine\Extension\SeoTrait;
use Lc\SovBundle\Doctrine\Extension\SluggableInterface;
use Lc\SovBundle\Doctrine\Extension\SluggableTrait;
use Lc\SovBundle\Doctrine\Extension\SortableInterface;
use Lc\SovBundle\Doctrine\Extension\SortableTrait;
use Lc\SovBundle\Doctrine\Extension\StatusTrait;
use Lc\SovBundle\Doctrine\Extension\TimestampableInterface;
use Lc\SovBundle\Doctrine\Extension\StatusInterface;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Lc\SovBundle\Doctrine\Extension\TimestampableTrait;


/**
* @ORM\MappedSuperclass
*/
abstract class EntityFullAbstract implements BlameableInterface, SeoInterface, SluggableInterface, SortableInterface,
StatusInterface, TimestampableInterface, DevAliasInterface, EntityInterface
{

use BlameableTrait;
use SeoTrait;
use SluggableTrait;
use SortableTrait;
use StatusTrait;
use TimestampableTrait;
use DevAliasTrait;

/**
* @Gedmo\Translatable
* @ORM\Column(type="string", length=255)
*/
protected $title;

/**
* @Gedmo\Translatable
* @ORM\Column(type="text", nullable=true)
*/
protected $description;


public function getTitle(): ?string
{
return $this->title;
}

public function setTitle(string $title): self
{
$this->title = $title;

return $this;
}


public function getDescription(): ?string
{
return $this->description;
}

public function setDescription(?string $description): self
{
$this->description = $description;

return $this;
}


}

+ 27
- 0
Doctrine/Pattern/EntityLightAbstract.php Просмотреть файл

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

namespace Lc\SovBundle\Doctrine\Pattern;

use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\SovBundle\Doctrine\Extension\BlameableInterface;
use Lc\SovBundle\Doctrine\Extension\BlameableTrait;
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasTrait;
use Lc\SovBundle\Doctrine\Extension\TimestampableInterface;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Lc\SovBundle\Doctrine\Extension\TimestampableTrait;

/**
* @ORM\MappedSuperclass
*/
abstract class EntityLightAbstract implements BlameableInterface, TimestampableInterface, DevAliasInterface,
EntityInterface
{

use BlameableTrait;
use DevAliasTrait;
use TimestampableTrait;

}

+ 0
- 19
Entity/Translation/EntityTranslation.php Просмотреть файл

@@ -1,19 +0,0 @@
<?php
namespace Lc\SovBundle\Entity\Translation;


use Doctrine\ORM\Mapping as ORM;
use Gedmo\Translatable\Entity\MappedSuperclass\AbstractTranslation;

/**
* @ORM\Table(name="lc_translations_entity", indexes={
* @ORM\Index(name="entity_translation_idx", columns={"locale", "object_class", "field", "foreign_key"})
* })
* @ORM\Entity(repositoryClass="Lc\SovBundle\Repository\BaseRepository")
*/

class EntityTranslation extends AbstractTranslation
{
//put your code here
}

+ 2
- 2
EventSubscriber/Translation/TranslationEasyAdminSubscriber.php Просмотреть файл

@@ -8,8 +8,8 @@ use EasyCorp\Bundle\EasyAdminBundle\Event\AfterCrudActionEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeCrudActionEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityPersistedEvent;
use Gedmo\Translatable\TranslatableListener;
use Lc\SovBundle\IModel\Translation\TranslatableInterface;
use Lc\SovBundle\Manager\EntityManager;
use Lc\SovBundle\Doctrine\Extension\TranslatableInterface;
use Lc\SovBundle\Doctrine\EntityManager;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use function Symfony\Component\Translation\t;


+ 2
- 2
Form/Type/FileManagerType.php Просмотреть файл

@@ -4,8 +4,8 @@ namespace Lc\SovBundle\Form\Type;

use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer;
use Lc\SovBundle\Entity\File\File;
use Lc\SovBundle\IModel\Cms\FileInterface;
use Lc\SovBundle\Manager\EntityManager;
use Lc\SovBundle\Doctrine\Extension\FileInterface;
use Lc\SovBundle\Doctrine\EntityManager;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;

+ 0
- 8
IModel/Cms/DevAliasInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\Cms;

interface DevAliasInterface
{

}

+ 0
- 10
IModel/Cms/SeoInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\Cms;

interface SeoInterface
{



}

+ 0
- 8
IModel/Cms/SluggableInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\Cms;

interface SluggableInterface
{

}

+ 0
- 8
IModel/Cms/SortableInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\Cms;

interface SortableInterface
{

}

+ 0
- 8
IModel/Cms/StatusInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\Cms;

interface StatusInterface
{

}

+ 0
- 69
Model/Cms/AbstractDocument.php Просмотреть файл

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

namespace Lc\SovBundle\Model\Cms;

use Lc\SovBundle\IModel\Cms\BlameableInterface;
use Lc\SovBundle\IModel\Cms\DevAliasInterface;
use Lc\SovBundle\IModel\Cms\SeoInterface;
use Lc\SovBundle\IModel\Cms\SluggableInterface;
use Lc\SovBundle\IModel\Cms\SortableInterface;
use Lc\SovBundle\IModel\Cms\TimestampableInterface;
use Lc\SovBundle\IModel\Cms\StatusInterface;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Lc\SovBundle\IModel\EntityInterface;

/**
* @ORM\MappedSuperclass
*/
abstract class AbstractDocument implements BlameableInterface, SeoInterface, SluggableInterface, SortableInterface, StatusInterface, TimestampableInterface, DevAliasInterface, EntityInterface
{

use BlameableTrait;
use SeoTrait;
use SluggableTrait;
use SortableTrait;
use StatusTrait;
use TimestampableTrait;
use DevAliasTrait;

/**
* @Gedmo\Translatable
* @ORM\Column(type="string", length=255)
*/
protected $title;

/**
* @Gedmo\Translatable
* @ORM\Column(type="text", nullable=true)
*/
protected $description;


public function getTitle(): ?string
{
return $this->title;
}

public function setTitle(string $title): self
{
$this->title = $title;

return $this;
}


public function getDescription(): ?string
{
return $this->description;
}

public function setDescription(?string $description): self
{
$this->description = $description;

return $this;
}


}

Model/Cms/File.php → Model/File/File.php Просмотреть файл

@@ -1,27 +1,23 @@
<?php
namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Model\File;


use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Lc\SovBundle\IModel\Cms\BlameableInterface;
use Lc\SovBundle\IModel\Cms\DevAliasInterface;
use Lc\SovBundle\IModel\Cms\SortableInterface;
use Lc\SovBundle\IModel\Cms\TimestampableInterface;
use Lc\SovBundle\IModel\EntityInterface;
use Lc\SovBundle\IModel\Translation\TranslatableInterface;
use Lc\SovBundle\Model\Cms\BlameableTrait;
use Lc\SovBundle\Model\Cms\DevAliasTrait;
use Lc\SovBundle\Model\Cms\SortableTrait;
use Lc\SovBundle\Model\Cms\TimestampableTrait;
use Lc\SovBundle\Model\Translation\TranslatableTrait;
use Lc\SovBundle\Entity\Translation\EntityTranslation;
use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\SovBundle\Doctrine\Extension\BlameableInterface;
use Lc\SovBundle\Doctrine\Extension\BlameableTrait;
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasTrait;
use Lc\SovBundle\Doctrine\Extension\SortableInterface;
use Lc\SovBundle\Doctrine\Extension\SortableTrait;
use Lc\SovBundle\Doctrine\Extension\TimestampableInterface;
use Lc\SovBundle\Doctrine\Extension\TimestampableTrait;
use Lc\SovBundle\Doctrine\Extension\TranslatableInterface;
use Lc\SovBundle\Doctrine\Extension\TranslatableTrait;

/**
* @Gedmo\TranslationEntity (class=EntityTranslation::class)
*/

abstract class File implements SortableInterface, BlameableInterface, TimestampableInterface, TranslatableInterface, DevAliasInterface, EntityInterface
abstract class File implements SortableInterface, BlameableInterface, TimestampableInterface, TranslatableInterface,
DevAliasInterface, EntityInterface
{
use DevAliasTrait;
use BlameableTrait;

IModel/Cms/FileInterface.php → Model/File/FileInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\Cms;
namespace Lc\SovBundle\Model\File;

interface FileInterface
{

+ 1
- 1
Model/User/User.php Просмотреть файл

@@ -3,7 +3,7 @@
namespace Lc\SovBundle\Model\User;

use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\IModel\EntityInterface;
use Lc\SovBundle\Doctrine\EntityInterface;
use Symfony\Component\Security\Core\User\UserInterface;

/**

IModel/User/UserInterface.php → Model/User/UserInterface.php Просмотреть файл

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

namespace Lc\SovBundle\IModel\User;
namespace Lc\SovBundle\Model\User;

interface UserInterface
{

+ 5
- 5
README.md Просмотреть файл

@@ -25,7 +25,7 @@ Si tu démarres un nouveau projet il te suffit de cloner le projet : https://git
orm:
resolve_target_entities:
Lc\SovBundle\IModel\User\UserInterface: App\Entity\User
Lc\SovBundle\IModel\Cms\FileInterface: App\Entity\File
Lc\SovBundle\Doctrine\Extension\FileInterface: App\Entity\File
#...
```
@@ -156,7 +156,7 @@ artgris_file_manager:
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;
@@ -183,7 +183,7 @@ artgris_file_manager:
````
- Modifier les entités pour que les Use pointe dans AdminBundle exemple avec `Entity/Page.php`.
````
use Lc\SovBundle\IModel\Cms\ImageInterface;
use Lc\SovBundle\Doctrine\Extension\ImageInterface;
use Lc\SovBundle\Model\Cms\AbstractDocument;
use Lc\SovBundle\Model\Cms\ImageTrait;
@@ -206,7 +206,7 @@ artgris_file_manager:
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)
@@ -214,7 +214,7 @@ artgris_file_manager:
* @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()
{

+ 0
- 0
Repository/.gitignore Просмотреть файл


Repository/Cms/FileRepository.php → Repository/File/FileRepository.php Просмотреть файл

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

namespace Lc\SovBundle\Repository\Cms;
namespace Lc\SovBundle\Repository\File;

use Lc\SovBundle\IModel\Cms\FileInterface;
use Lc\SovBundle\Repository\BaseRepository;
use Lc\SovBundle\Doctrine\Extension\FileInterface;
use Lc\SovBundle\Repository\RepositoryAbstract;
/**
* @method FileInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method FileInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method FileInterface[] findAll()
* @method FileInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class FileRepository extends BaseRepository
class FileRepository extends RepositoryAbstract
{
public function getInterfaceClass()
{

Repository/BaseRepository.php → Repository/RepositoryAbstract.php Просмотреть файл

@@ -9,9 +9,10 @@ use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
use Gedmo\Translatable\TranslatableListener;
use Lc\SovBundle\IModel\Cms\StatusInterface;
use Lc\SovBundle\Doctrine\Extension\StatusInterface;

abstract class BaseRepository extends EntityRepository implements ServiceEntityRepositoryInterface, BaseRepositoryInterface
abstract class RepositoryAbstract extends EntityRepository implements ServiceEntityRepositoryInterface,
RepositoryAbstractInterface
{

protected $defaultLocale;

Repository/BaseRepositoryInterface.php → Repository/RepositoryAbstractInterface.php Просмотреть файл

@@ -3,7 +3,7 @@
namespace Lc\SovBundle\Repository;


interface BaseRepositoryInterface
interface RepositoryAbstractInterface
{

/**

+ 3
- 3
Repository/User/UserRepository.php Просмотреть файл

@@ -4,8 +4,8 @@ namespace Lc\SovBundle\Repository\User;

use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use Lc\SovBundle\IModel\User\UserInterface;
use Lc\SovBundle\Repository\BaseRepository;
use Lc\SovBundle\Model\User\UserInterface;
use Lc\SovBundle\Repository\RepositoryAbstract;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
use Symfony\Component\Security\Core\User\UserInterface as SfUserInterface;
@@ -16,7 +16,7 @@ use Symfony\Component\Security\Core\User\UserInterface as SfUserInterface;
* @method UserInterface[] findAll()
* @method UserInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class UserRepository extends BaseRepository implements PasswordUpgraderInterface
class UserRepository extends RepositoryAbstract implements PasswordUpgraderInterface
{
public function getInterfaceClass()
{

Загрузка…
Отмена
Сохранить