@@ -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; | |||
} |
@@ -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; | |||
} |
@@ -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; | |||
@@ -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; | |||
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\CaracoleBundle\Model\Site ; | |||
interface NewsInterface | |||
{ | |||
} |
@@ -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; | |||
} | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\CaracoleBundle\Model\Site; | |||
interface PageInterface | |||
{ | |||
} |
@@ -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; |
@@ -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; | |||
} | |||
} |
@@ -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; | |||
} | |||
} |