Browse Source

Produits : finition intégration pictos dans liste

reduction
Guillaume 4 years ago
parent
commit
b18562752d
1 changed files with 17 additions and 1 deletions
  1. +17
    -1
      ShopBundle/Model/ProductFamily.php

+ 17
- 1
ShopBundle/Model/ProductFamily.php View File

return $this->isNovelty; 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 public function setIsNovelty(?bool $isNovelty): self
{ {
$this->isNovelty = $isNovelty; $this->isNovelty = $isNovelty;
return $this; return $this;
} }



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

Loading…
Cancel
Save