소스 검색

Produits : finition intégration pictos dans liste

reduction
Guillaume 4 년 전
부모
커밋
b18562752d
1개의 변경된 파일17개의 추가작업 그리고 1개의 파일을 삭제
  1. +17
    -1
      ShopBundle/Model/ProductFamily.php

+ 17
- 1
ShopBundle/Model/ProductFamily.php 파일 보기

@@ -276,6 +276,23 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr
return $this->isNovelty;
}

public function isNoveltyOnline(): ?bool
{
if($this->isNovelty) {
if($this->getNoveltyExpirationDate()) {
$now = new \DateTime() ;
if($now <= $this->getNoveltyExpirationDate()) {
return true ;
}
}
else {
return true ;
}
}

return false ;
}

public function setIsNovelty(?bool $isNovelty): self
{
$this->isNovelty = $isNovelty;
@@ -295,7 +312,6 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr
return $this;
}


public function getIsOrganic(): ?bool
{
return $this->isOrganic;

Loading…
취소
저장