Add privacy policy field to warranty. Add getter and setter and method to check for privacy policy in Warranty. #256
This commit is contained in:
parent
a93801d933
commit
6398c58b32
1 changed files with 26 additions and 0 deletions
|
|
@ -127,6 +127,13 @@ class Warranty
|
|||
*/
|
||||
protected $flag_activated;
|
||||
|
||||
// privacy policy
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="PrivacyPolicy")
|
||||
* @ORM\JoinColumn(name="warranty_privacy_policy", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
protected $privacy_policy;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->date_create = new DateTime();
|
||||
|
|
@ -366,4 +373,23 @@ class Warranty
|
|||
{
|
||||
return $this->flag_activated;
|
||||
}
|
||||
|
||||
public function hasPrivacyPolicy()
|
||||
{
|
||||
if ($this->privacy_policy == null)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function setPrivacyPolicy(PrivacyPolicy $privacy_policy)
|
||||
{
|
||||
$this->privacy_policy = $privacy_policy;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPrivacyPolicy()
|
||||
{
|
||||
return $this->privacy_policy;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue