您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

NewsFactory.php 589B

3 年前
3 年前
3 年前
3 年前
12345678910111213141516171819202122232425
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Site;
  3. use Lc\CaracoleBundle\Context\MerchantContextTrait;
  4. use Lc\CaracoleBundle\Context\SectionContextTrait;
  5. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  6. use Lc\SovBundle\Factory\Site\NewsFactory as SovNewsFactory;
  7. use Lc\SovBundle\Model\Site\NewsInterface;
  8. class NewsFactory extends SovNewsFactory
  9. {
  10. use SectionContextTrait;
  11. public function create(): NewsInterface
  12. {
  13. $news = parent::create();
  14. if($this->section) {
  15. $news->setSection($this->section);
  16. }
  17. return $news;
  18. }
  19. }