Guillaume 3 лет назад
Родитель
Сommit
2c1c7b66e7
10 измененных файлов: 36 добавлений и 128 удалений
  1. +13
    -0
      Controller/Site/NewsAdminController.php
  2. +13
    -0
      Controller/Site/PageAdminController.php
  3. +4
    -4
      Model/Merchant/MerchantModel.php
  4. +2
    -2
      Model/Section/SectionModel.php
  5. +0
    -8
      Model/Site/NewsInterface.php
  6. +2
    -38
      Model/Site/NewsModel.php
  7. +0
    -8
      Model/Site/PageInterface.php
  8. +2
    -23
      Model/Site/PageModel.php
  9. +0
    -22
      Repository/Site/NewsRepository.php
  10. +0
    -23
      Repository/Site/PageRepository.php

+ 13
- 0
Controller/Site/NewsAdminController.php Просмотреть файл

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

namespace Lc\CaracoleBundle\Controller\Site;

use Lc\CaracoleBundle\Controller\AdminControllerTrait;
use Lc\SovBundle\Controller\Site\NewsAdminController as SovNewsAdminController;

abstract class NewsAdminController extends SovNewsAdminController
{

use AdminControllerTrait;

}

+ 13
- 0
Controller/Site/PageAdminController.php Просмотреть файл

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

namespace Lc\CaracoleBundle\Controller\Site;

use Lc\CaracoleBundle\Controller\AdminControllerTrait;
use Lc\SovBundle\Controller\Site\PageAdminController as SovPageAdminController;

abstract class PageAdminController extends SovPageAdminController
{

use AdminControllerTrait;

}

+ 4
- 4
Model/Merchant/MerchantModel.php Просмотреть файл

@@ -14,8 +14,8 @@ use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface;
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
use Lc\CaracoleBundle\Model\Setting\EntitySettingTrait;
use Lc\CaracoleBundle\Model\Setting\MerchantSettingInterface;
use Lc\CaracoleBundle\Model\Site\NewsInterface;
use Lc\CaracoleBundle\Model\Site\PageInterface;
use Lc\SovBundle\Model\Site\NewsInterface;
use Lc\SovBundle\Model\Site\PageInterface;
use Lc\SovBundle\Model\User\GroupUserInterface;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;

@@ -61,12 +61,12 @@ abstract class MerchantModel extends AbstractFullEntity
protected $productCategories;

/**
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Site\NewsInterface", mappedBy="merchant", orphanRemoval=true)
* @ORM\OneToMany(targetEntity="Lc\SovBundle\Model\Site\NewsInterface", mappedBy="merchant", orphanRemoval=true)
*/
protected $news;

/**
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Site\PageInterface", mappedBy="merchant", orphanRemoval=true)
* @ORM\OneToMany(targetEntity="Lc\SovBundle\Model\Site\PageInterface", mappedBy="merchant", orphanRemoval=true)
*/
protected $pages;


+ 2
- 2
Model/Section/SectionModel.php Просмотреть файл

@@ -12,7 +12,7 @@ use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface;
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
use Lc\CaracoleBundle\Model\Setting\EntitySettingTrait;
use Lc\CaracoleBundle\Model\Setting\SectionSettingInterface;
use Lc\CaracoleBundle\Model\Site\PageInterface;
use Lc\SovBundle\Model\Site\PageInterface;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;

/**
@@ -65,7 +65,7 @@ abstract class SectionModel extends AbstractFullEntity implements FilterMerchant
protected $productCategories;

/**
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Site\PageInterface", mappedBy="section")
* @ORM\OneToMany(targetEntity="Lc\SovBundle\Model\Site\PageInterface", mappedBy="section")
*/
protected $pages;


+ 0
- 8
Model/Site/NewsInterface.php Просмотреть файл

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

namespace Lc\CaracoleBundle\Model\Site ;

interface NewsInterface
{

}

+ 2
- 38
Model/Site/NewsModel.php Просмотреть файл

@@ -4,14 +4,13 @@ namespace Lc\CaracoleBundle\Model\Site;

use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface;
use Gedmo\Mapping\Annotation as Gedmo;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
use Lc\SovBundle\Model\Site\NewsModel as SovNewsModel;

/**
* @ORM\MappedSuperclass()
*/
abstract class NewsModel extends AbstractFullEntity implements FilterMerchantInterface
abstract class NewsModel extends SovNewsModel implements FilterMerchantInterface
{
/**
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="news")
@@ -19,29 +18,6 @@ abstract class NewsModel extends AbstractFullEntity implements FilterMerchantInt
*/
protected $merchant;

/**
* @ORM\Column(type="datetime")
* @Gedmo\Timestampable(on="create")
*/
protected $date;

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

public function getDate(): ?\DateTimeInterface
{
return $this->date;
}

public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;

return $this;
}

public function getMerchant(): ?MerchantInterface
{
return $this->merchant;
@@ -53,16 +29,4 @@ abstract class NewsModel extends AbstractFullEntity implements FilterMerchantInt

return $this;
}

public function getIsSent(): ?bool
{
return $this->isSent;
}

public function setIsSent(?bool $isSent): self
{
$this->isSent = $isSent;

return $this;
}
}

+ 0
- 8
Model/Site/PageInterface.php Просмотреть файл

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

namespace Lc\CaracoleBundle\Model\Site;

interface PageInterface
{

}

+ 2
- 23
Model/Site/PageModel.php Просмотреть файл

@@ -7,17 +7,13 @@ use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface;
use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\CaracoleBundle\Model\Section\SectionInterface;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
use Lc\SovBundle\Model\Site\PageModel as SovPageModel;

/**
* @ORM\MappedSuperclass()
*/
abstract class PageModel extends AbstractFullEntity implements FilterMerchantInterface, FilterSectionInterface
abstract class PageModel extends SovPageModel implements FilterMerchantInterface, FilterSectionInterface
{
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $content;

/**
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="pages")
@@ -31,23 +27,6 @@ abstract class PageModel extends AbstractFullEntity implements FilterMerchantInt
protected $section;


public function __toString()
{
return $this->getTitle();
}

public function getContent(): ?string
{
return $this->content;
}

public function setContent(?string $content): self
{
$this->content = $content;

return $this;
}

public function getMerchant(): ?MerchantInterface
{
return $this->merchant;

+ 0
- 22
Repository/Site/NewsRepository.php Просмотреть файл

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

namespace Lc\CaracoleBundle\Repository\Site;

use Lc\CaracoleBundle\Model\Site\NewsInterface;
use Lc\SovBundle\Repository\AbstractRepository;

/**
* @method NewsInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method NewsInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method NewsInterface[] findAll()
* @method NewsInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class NewsRepository extends AbstractRepository
{
public function getInterfaceClass()
{
return NewsInterface::class;
}


}

+ 0
- 23
Repository/Site/PageRepository.php Просмотреть файл

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

namespace Lc\CaracoleBundle\Repository\Site;

use Lc\CaracoleBundle\Model\Site\NewsInterface;
use Lc\CaracoleBundle\Model\Site\PageInterface;
use Lc\SovBundle\Repository\AbstractRepository;

/**
* @method PageInterface|null find($id, $lockMode = null, $lockVersion = null)
* @method PageInterface|null findOneBy(array $criteria, array $orderBy = null)
* @method PageInterface[] findAll()
* @method PageInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class PageRepository extends AbstractRepository
{
public function getInterfaceClass()
{
return PageInterface::class;
}


}

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