Created
August 13, 2020 12:31
-
-
Save caiaffa/5030728ab220bda66f0c1876499dde0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Entity; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Symfony\Component\Validator\Constraints as Assert; | |
class ProductDto | |
{ | |
/** | |
* @Assert\NotBlank(payload={"severity"="error"}, message="dasdasdasdsa") | |
*/ | |
private $description; | |
/** | |
* @Assert\NotBlank(payload={"severity"="error"}) | |
*/ | |
private $name; | |
/** | |
* @var TestDto[]|ArrayCollection | |
* @Assert\Valid() | |
*/ | |
protected $contractsRenovation; | |
public function __construct() | |
{ | |
$this->contractsRenovation = new ArrayCollection(); | |
} | |
public function getDescription(): ?string | |
{ | |
return $this->description; | |
} | |
public function setDescription(string $description): self | |
{ | |
$this->description = $description; | |
return $this; | |
} | |
public function getContractsRenovation() | |
{ | |
return $this->contractsRenovation; | |
} | |
public function getName(): ?string | |
{ | |
return $this->name; | |
} | |
public function setName(string $name): self | |
{ | |
$this->name = $name; | |
return $this; | |
} | |
public function setContractsRenovation($contractsRenovation) | |
{ | |
$this->contractsRenovation[] = $contractsRenovation; | |
return $this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment