Pārlūkot izejas kodu

Création du bundle

tags/0.1
Fab pirms 3 gadiem
vecāks
revīzija
58966560d1
46 mainītis faili ar 280 papildinājumiem un 197 dzēšanām
  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 Parādīt failu



namespace Lc\SovBundle\Authenticator; 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\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\User\UserInterface as SfUserInterface; use Symfony\Component\Security\Core\User\UserInterface as SfUserInterface;

+ 2
- 2
Command/CreateUserCommand.php Parādīt failu

namespace Lc\SovBundle\Command; 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\Command\Command;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;

+ 1
- 1
Controller/Admin/AbstractCrudController.php Parādīt failu

use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController as EaAbstractCrudController; use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController as EaAbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator; use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator;
use Lc\SovBundle\IModel\Translation\TranslatableInterface;
use Lc\SovBundle\Doctrine\Extension\TranslatableInterface;


abstract class AbstractCrudController extends EaAbstractCrudController abstract class AbstractCrudController extends EaAbstractCrudController
{ {

IModel/EntityInterface.php → Doctrine/EntityInterface.php Parādīt failu

<?php <?php


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


interface EntityInterface interface EntityInterface
{ {

Manager/EntityManager.php → Doctrine/EntityManager.php Parādīt failu

<?php <?php


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


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

IModel/Cms/BlameableInterface.php → Doctrine/Extension/BlameableInterface.php Parādīt failu

<?php <?php


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



interface BlameableInterface interface BlameableInterface
{ {

Model/Cms/BlameableTrait.php → Doctrine/Extension/BlameableTrait.php Parādīt failu

<?php <?php


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


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


trait BlameableTrait trait BlameableTrait
{ {

+ 8
- 0
Doctrine/Extension/DevAliasInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\Doctrine\Extension;

interface DevAliasInterface
{

}

Model/Cms/DevAliasTrait.php → Doctrine/Extension/DevAliasTrait.php Parādīt failu

<?php <?php


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


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


trait DevAliasTrait trait DevAliasTrait

+ 10
- 0
Doctrine/Extension/OpenGraphInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\Doctrine\Extension;

interface OpenGraphInterface
{



}

+ 64
- 0
Doctrine/Extension/OpenGraphTrait.php Parādīt failu

<?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 Parādīt failu

<?php

namespace Lc\SovBundle\Doctrine\Extension;

interface SeoInterface
{



}

Model/Cms/SeoTrait.php → Doctrine/Extension/SeoTrait.php Parādīt failu

<?php <?php


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


use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;



+ 8
- 0
Doctrine/Extension/SluggableInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\Doctrine\Extension;

interface SluggableInterface
{

}

Model/Cms/SluggableTrait.php → Doctrine/Extension/SluggableTrait.php Parādīt failu

<?php <?php


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


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

+ 8
- 0
Doctrine/Extension/SortableInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\Doctrine\Extension;

interface SortableInterface
{

}

Model/Cms/SortableTrait.php → Doctrine/Extension/SortableTrait.php Parādīt failu

<?php <?php


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


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

+ 8
- 0
Doctrine/Extension/StatusInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\Doctrine\Extension;

interface StatusInterface
{

}

Model/Cms/StatusTrait.php → Doctrine/Extension/StatusTrait.php Parādīt failu

<?php <?php


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


use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;



IModel/Cms/TimestampableInterface.php → Doctrine/Extension/TimestampableInterface.php Parādīt failu

<?php <?php


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


interface TimestampableInterface interface TimestampableInterface
{ {

Model/Cms/TimestampableTrait.php → Doctrine/Extension/TimestampableTrait.php Parādīt failu

<?php <?php


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


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

IModel/Translation/TranslatableInterface.php → Doctrine/Extension/TranslatableInterface.php Parādīt failu

<?php <?php


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


interface TranslatableInterface interface TranslatableInterface
{ {

Model/Translation/TranslatableTrait.php → Doctrine/Extension/TranslatableTrait.php Parādīt failu

<?php <?php


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


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



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

IModel/Cms/TreeInterface.php → Doctrine/Extension/TreeInterface.php Parādīt failu

<?php <?php


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


interface TreeInterface interface TreeInterface
{ {

Model/Cms/TreeTrait.php → Doctrine/Extension/TreeTrait.php Parādīt failu

<?php <?php


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


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

+ 78
- 0
Doctrine/Pattern/EntityFullAbstract.php Parādīt failu

<?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 Parādīt failu

<?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 Parādīt failu

<?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 Parādīt failu

use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeCrudActionEvent; use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeCrudActionEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityPersistedEvent; use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityPersistedEvent;
use Gedmo\Translatable\TranslatableListener; 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 Symfony\Component\EventDispatcher\EventSubscriberInterface;
use function Symfony\Component\Translation\t; use function Symfony\Component\Translation\t;



+ 2
- 2
Form/Type/FileManagerType.php Parādīt failu



use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer; use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer;
use Lc\SovBundle\Entity\File\File; 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\AbstractType;
use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Extension\Core\Type\HiddenType; use Symfony\Component\Form\Extension\Core\Type\HiddenType;

+ 0
- 8
IModel/Cms/DevAliasInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\IModel\Cms;

interface DevAliasInterface
{

}

+ 0
- 10
IModel/Cms/SeoInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\IModel\Cms;

interface SeoInterface
{



}

+ 0
- 8
IModel/Cms/SluggableInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\IModel\Cms;

interface SluggableInterface
{

}

+ 0
- 8
IModel/Cms/SortableInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\IModel\Cms;

interface SortableInterface
{

}

+ 0
- 8
IModel/Cms/StatusInterface.php Parādīt failu

<?php

namespace Lc\SovBundle\IModel\Cms;

interface StatusInterface
{

}

+ 0
- 69
Model/Cms/AbstractDocument.php Parādīt failu

<?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 Parādīt failu

<?php <?php
namespace Lc\SovBundle\Model\Cms;
namespace Lc\SovBundle\Model\File;




use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; 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 DevAliasTrait;
use BlameableTrait; use BlameableTrait;

IModel/Cms/FileInterface.php → Model/File/FileInterface.php Parādīt failu

<?php <?php


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


interface FileInterface interface FileInterface
{ {

+ 1
- 1
Model/User/User.php Parādīt failu

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


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


/** /**

IModel/User/UserInterface.php → Model/User/UserInterface.php Parādīt failu

<?php <?php


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


interface UserInterface interface UserInterface
{ {

+ 5
- 5
README.md Parādīt failu

orm: orm:
resolve_target_entities: resolve_target_entities:
Lc\SovBundle\IModel\User\UserInterface: App\Entity\User Lc\SovBundle\IModel\User\UserInterface: App\Entity\User
Lc\SovBundle\IModel\Cms\FileInterface: App\Entity\File
Lc\SovBundle\Doctrine\Extension\FileInterface: App\Entity\File
#... #...
``` ```
namespace App\Entity; namespace App\Entity;
use Doctrine\ORM\Mapping as ORM; 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 Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Lc\SovBundle\Model\User\User as LcUserModel; use Lc\SovBundle\Model\User\User as LcUserModel;
```` ````
- Modifier les entités pour que les Use pointe dans AdminBundle exemple avec `Entity/Page.php`. - 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\AbstractDocument;
use Lc\SovBundle\Model\Cms\ImageTrait; use Lc\SovBundle\Model\Cms\ImageTrait;
namespace App\Repository; namespace App\Repository;
use App\Entity\Page; use App\Entity\Page;
use Lc\SovBundle\Repository\BaseRepository;
use Lc\SovBundle\Repository\RepositoryAbstract;
/** /**
* @method Page|null find($id, $lockMode = null, $lockVersion = null) * @method Page|null find($id, $lockMode = null, $lockVersion = null)
* @method Page[] findAll() * @method Page[] findAll()
* @method Page[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) * @method Page[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/ */
class PageRepository extends BaseRepository
class PageRepository extends RepositoryAbstract
{ {
public function getInterfaceClass() public function getInterfaceClass()
{ {

+ 0
- 0
Repository/.gitignore Parādīt failu


Repository/Cms/FileRepository.php → Repository/File/FileRepository.php Parādīt failu

<?php <?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 find($id, $lockMode = null, $lockVersion = null)
* @method FileInterface|null findOneBy(array $criteria, array $orderBy = null) * @method FileInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method FileInterface[] findAll() * @method FileInterface[] findAll()
* @method FileInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) * @method FileInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/ */
class FileRepository extends BaseRepository
class FileRepository extends RepositoryAbstract
{ {
public function getInterfaceClass() public function getInterfaceClass()
{ {

Repository/BaseRepository.php → Repository/RepositoryAbstract.php Parādīt failu

use Doctrine\ORM\Query; use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use Gedmo\Translatable\TranslatableListener; 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; protected $defaultLocale;

Repository/BaseRepositoryInterface.php → Repository/RepositoryAbstractInterface.php Parādīt failu

namespace Lc\SovBundle\Repository; namespace Lc\SovBundle\Repository;




interface BaseRepositoryInterface
interface RepositoryAbstractInterface
{ {


/** /**

+ 3
- 3
Repository/User/UserRepository.php Parādīt failu



use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry; 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\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
use Symfony\Component\Security\Core\User\UserInterface as SfUserInterface; use Symfony\Component\Security\Core\User\UserInterface as SfUserInterface;
* @method UserInterface[] findAll() * @method UserInterface[] findAll()
* @method UserInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) * @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() public function getInterfaceClass()
{ {

Notiek ielāde…
Atcelt
Saglabāt